HTTP 400 · Bad Request
HTTP 400 Flood / Rate limits

When & why it happens

The account already has the maximum number of bot commands allowed. Remove some before adding more.

Handling in gogram

Surfaced as *gogram.ErrResponseCode. Match on the message:

if err, ok := err.(*gogram.ErrResponseCode); ok { if err.Message == "BOT_COMMANDS_TOO_MUCH" { // handle this error } }