go-telegram / bot

Telegram Bot API Go framework
MIT License
502 stars 46 forks source link

The setChatMenuButton doesn't work as specified in the API. #52

Closed DmitriiNov closed 5 months ago

DmitriiNov commented 6 months ago

Code

_, err = b.SetChatMenuButton(ctx, &bot.SetChatMenuButtonParams{
    ChatID: nil,
    MenuButton: &models.MenuButtonCommands{
        Type: "commands",
    },
})

API request

{"chat_id":null,"menu_button":{"type":"commands"}}

API response

{"ok":false,"error_code":400,"description":"Bad Request: invalid chat_id specified"}

API description

Link. In the API description - Unique identifier for the target private chat. If not specified, default bot's menu button will be changed

DmitriiNov commented 6 months ago

53 Created pull request

negasus commented 5 months ago

Merged