diff --git a/internal/app/bot.go b/internal/app/bot.go index a9cb018..b1ae044 100644 --- a/internal/app/bot.go +++ b/internal/app/bot.go @@ -126,6 +126,11 @@ func (b *bot) SetCommands(ctx context.Context) (err error) { fmt.Println(commands) if len(commands) > 0 { if b.settings.Debug.Commands.Reset || b.settings.Debug.Commands.Clear { + b.tgbot.DeleteMyCommands(ctx, &telego.DeleteMyCommandsParams{ + Scope: &telego.BotCommandScopeAllChatAdministrators{ + Type: "all_chat_administrators", + }, + }) b.tgbot.DeleteMyCommands(ctx, &telego.DeleteMyCommandsParams{}) } for _, command := range commands { @@ -137,12 +142,10 @@ func (b *bot) SetCommands(ctx context.Context) (err error) { return } b.tgbot.SetMyCommands(ctx, &telego.SetMyCommandsParams{ + Scope: &telego.BotCommandScopeAllChatAdministrators{ + Type: "all_chat_administrators", + }, Commands: []telego.BotCommand{ - { - Command: "help", - Description: "Displays bot usage and help.", - IsEphemeral: true, - }, { Command: "settings", Description: "Bot settings.", @@ -153,6 +156,15 @@ func (b *bot) SetCommands(ctx context.Context) (err error) { Description: "Starts the bot and links it to the current user's channel.", IsEphemeral: true, }, + }, + }) + b.tgbot.SetMyCommands(ctx, &telego.SetMyCommandsParams{ + Commands: []telego.BotCommand{ + { + Command: "help", + Description: "Displays bot usage and help.", + IsEphemeral: true, + }, { Command: "announce", Description: "Adds an announcement to the bot.",