From fa6a8f9a72244cba3e4c13773ddc7f6887a509c9 Mon Sep 17 00:00:00 2001 From: rfshubert Date: Sun, 22 Feb 2026 23:57:31 -0300 Subject: [PATCH 1/5] feat: register Telegram command menu via SetMyCommands Call bot.SetMyCommands() on startup so that Telegram displays the command menu when users press "/" in chat. Registration failure is logged as a warning and does not block bot startup. --- pkg/channels/telegram.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkg/channels/telegram.go b/pkg/channels/telegram.go index a0a1c8d0a8..6c3f0ae967 100644 --- a/pkg/channels/telegram.go +++ b/pkg/channels/telegram.go @@ -130,6 +130,13 @@ func (c *TelegramChannel) Start(ctx context.Context) error { "username": c.bot.Username(), }) + // Register command menu with Telegram + if err := c.registerCommands(ctx); err != nil { + logger.WarnCF("telegram", "Failed to register commands menu", map[string]any{ + "error": err.Error(), + }) + } + go bh.Start() go func() { @@ -146,6 +153,19 @@ func (c *TelegramChannel) Stop(ctx context.Context) error { return nil } +func (c *TelegramChannel) registerCommands(ctx context.Context) error { + commands := []telego.BotCommand{ + {Command: "start", Description: "Start the bot"}, + {Command: "help", Description: "Show available commands"}, + {Command: "show", Description: "Show current configuration"}, + {Command: "list", Description: "List available options"}, + } + + return c.bot.SetMyCommands(ctx, &telego.SetMyCommandsParams{ + Commands: commands, + }) +} + func (c *TelegramChannel) Send(ctx context.Context, msg bus.OutboundMessage) error { if !c.IsRunning() { return fmt.Errorf("telegram bot not running") From 63a599732c95b884048cd0eae8e817fb3cfc160a Mon Sep 17 00:00:00 2001 From: Raphael Schubert <41387624+rfschubert@users.noreply.github.com> Date: Mon, 23 Feb 2026 00:02:00 -0300 Subject: [PATCH 2/5] Update pkg/channels/telegram.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pkg/channels/telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/channels/telegram.go b/pkg/channels/telegram.go index 6c3f0ae967..a5a467f888 100644 --- a/pkg/channels/telegram.go +++ b/pkg/channels/telegram.go @@ -156,7 +156,7 @@ func (c *TelegramChannel) Stop(ctx context.Context) error { func (c *TelegramChannel) registerCommands(ctx context.Context) error { commands := []telego.BotCommand{ {Command: "start", Description: "Start the bot"}, - {Command: "help", Description: "Show available commands"}, + {Command: "help", Description: "Show this help message"}, {Command: "show", Description: "Show current configuration"}, {Command: "list", Description: "List available options"}, } From 58c1bac4934a2f98a1773043d5a739d5a8603556 Mon Sep 17 00:00:00 2001 From: Raphael Schubert <41387624+rfschubert@users.noreply.github.com> Date: Mon, 23 Feb 2026 00:05:47 -0300 Subject: [PATCH 3/5] Update pkg/channels/telegram.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pkg/channels/telegram.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/channels/telegram.go b/pkg/channels/telegram.go index a5a467f888..81a8a07244 100644 --- a/pkg/channels/telegram.go +++ b/pkg/channels/telegram.go @@ -157,8 +157,8 @@ func (c *TelegramChannel) registerCommands(ctx context.Context) error { commands := []telego.BotCommand{ {Command: "start", Description: "Start the bot"}, {Command: "help", Description: "Show this help message"}, - {Command: "show", Description: "Show current configuration"}, - {Command: "list", Description: "List available options"}, + {Command: "show", Description: "Show current configuration (model or channel)"}, + {Command: "list", Description: "List available options (models or channels)"}, } return c.bot.SetMyCommands(ctx, &telego.SetMyCommandsParams{ From 04e069e246b032cc3b2e1b9b4fda3e8ee373eaa5 Mon Sep 17 00:00:00 2001 From: Raphael Schubert <41387624+rfschubert@users.noreply.github.com> Date: Mon, 23 Feb 2026 00:08:21 -0300 Subject: [PATCH 4/5] Update pkg/channels/telegram.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pkg/channels/telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/channels/telegram.go b/pkg/channels/telegram.go index 81a8a07244..b229e0a1d8 100644 --- a/pkg/channels/telegram.go +++ b/pkg/channels/telegram.go @@ -157,7 +157,7 @@ func (c *TelegramChannel) registerCommands(ctx context.Context) error { commands := []telego.BotCommand{ {Command: "start", Description: "Start the bot"}, {Command: "help", Description: "Show this help message"}, - {Command: "show", Description: "Show current configuration (model or channel)"}, + {Command: "show", Description: "Show current configuration"}, {Command: "list", Description: "List available options (models or channels)"}, } From 83ac9e6d88da80a5ef291190682034e7a3038f35 Mon Sep 17 00:00:00 2001 From: Raphael Schubert <41387624+rfschubert@users.noreply.github.com> Date: Mon, 23 Feb 2026 00:08:28 -0300 Subject: [PATCH 5/5] Update pkg/channels/telegram.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pkg/channels/telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/channels/telegram.go b/pkg/channels/telegram.go index b229e0a1d8..a5a467f888 100644 --- a/pkg/channels/telegram.go +++ b/pkg/channels/telegram.go @@ -158,7 +158,7 @@ func (c *TelegramChannel) registerCommands(ctx context.Context) error { {Command: "start", Description: "Start the bot"}, {Command: "help", Description: "Show this help message"}, {Command: "show", Description: "Show current configuration"}, - {Command: "list", Description: "List available options (models or channels)"}, + {Command: "list", Description: "List available options"}, } return c.bot.SetMyCommands(ctx, &telego.SetMyCommandsParams{