Skip to content

Commit a3d5084

Browse files
author
mj
committed
chore(telegram): remove PaguModeration for telegram
1 parent f2bf777 commit a3d5084

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

internal/platforms/telegram/telegram.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func NewTelegramBot(botEngine *engine.BotEngine, token string, cfg *config.Confi
3939
Poller: &tele.LongPoller{Timeout: 10 * time.Second},
4040
}
4141

42-
bot, err := tele.NewBot(pref)
42+
tgb, err := tele.NewBot(pref)
4343
if err != nil {
4444
log.Error("Failed to create Telegram bot:", err)
4545
return nil, err
@@ -49,7 +49,7 @@ func NewTelegramBot(botEngine *engine.BotEngine, token string, cfg *config.Confi
4949

5050
return &Bot{
5151
engine: botEngine,
52-
botInstance: bot,
52+
botInstance: tgb,
5353
cfg: cfg,
5454
ctx: ctx,
5555
cancel: cancel,
@@ -95,11 +95,6 @@ func (bot *Bot) registerCommands() error {
9595
if !util.IsFlagSet(beCmd.TargetFlag, command.TargetMaskTest) {
9696
continue
9797
}
98-
99-
case config.BotNamePaguModerator:
100-
if !util.IsFlagSet(beCmd.TargetFlag, command.TargetMaskModerator) {
101-
continue
102-
}
10398
}
10499

105100
log.Info("registering new command", "name", beCmd.Name, "desc", beCmd.Help, "index", i, "object", beCmd)

0 commit comments

Comments
 (0)