mirror of
https://github.com/kemko/memes-telegram-integration.git
synced 2026-01-01 15:55:41 +03:00
feat: set bot commands (#54)
This commit is contained in:
17
memogram.go
17
memogram.go
@@ -73,6 +73,23 @@ func (s *Service) Start(ctx context.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
slog.Info("workspace profile", slog.Any("profile", workspaceProfile))
|
slog.Info("workspace profile", slog.Any("profile", workspaceProfile))
|
||||||
|
|
||||||
|
// set bot commands
|
||||||
|
commands := []models.BotCommand{
|
||||||
|
{
|
||||||
|
Command: "start",
|
||||||
|
Description: "Start the bot with access token",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Command: "search",
|
||||||
|
Description: "Search for the memos",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
_, err = s.bot.SetMyCommands(ctx, &bot.SetMyCommandsParams{Commands: commands})
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("failed to set bot commands", slog.Any("err", err))
|
||||||
|
}
|
||||||
|
|
||||||
s.bot.Start(ctx)
|
s.bot.Start(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user