feat(telegram): Changed command scope
This commit is contained in:
parent
d1a66cbf50
commit
1b1e472df2
1 changed files with 2 additions and 2 deletions
|
|
@ -149,7 +149,7 @@ func (c *TelegramChannel) Stop(ctx context.Context) error {
|
||||||
|
|
||||||
func (c *TelegramChannel) initBotCommands(ctx context.Context) error {
|
func (c *TelegramChannel) initBotCommands(ctx context.Context) error {
|
||||||
currentCommands, err := c.bot.GetMyCommands(ctx, &telego.GetMyCommandsParams{
|
currentCommands, err := c.bot.GetMyCommands(ctx, &telego.GetMyCommandsParams{
|
||||||
Scope: tu.ScopeAllPrivateChats(),
|
Scope: tu.ScopeDefault(),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("get commands: %w", err)
|
return fmt.Errorf("get commands: %w", err)
|
||||||
|
|
@ -180,7 +180,7 @@ func (c *TelegramChannel) initBotCommands(ctx context.Context) error {
|
||||||
|
|
||||||
err = c.bot.SetMyCommands(ctx, &telego.SetMyCommandsParams{
|
err = c.bot.SetMyCommands(ctx, &telego.SetMyCommandsParams{
|
||||||
Commands: commands,
|
Commands: commands,
|
||||||
Scope: tu.ScopeAllPrivateChats(),
|
Scope: tu.ScopeDefault(),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("set commands: %w", err)
|
return fmt.Errorf("set commands: %w", err)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue