When sending a bot command in the form of /command@BOTNAME in a topic, the message will not be delivered to the right topic. It will appear in the #general default chat instead.
This message has the message_thread_id field set to none, despite having been sent in a topic: I checked both with the Bot API and with the MTProto API.
This issue does not present itself when using other clients or when using commands in the form of /command.
Note that clicking on a command in the bot commands menu sends the command in this form, which renders that menu useless in a topic chat.
Workarounds
Don't use the command menu
Omit the @BOTNAME
Use other clients
Steps to reproduce
Have a bot with commands in a chat with topics enabled
In a topic, send a command in the form /command@BOTNAME
The message will appear in the topic at first, but the bot will probably answer to the command in the #general default chat
Refresh the page or check the chat from another client: the message with the command will now be in the #general default chat as well
Check with the APIs the message with the command: the message_thread_id field is missing
Log in here to report bugs or suggest features. Please enter your phone number in the international format and we will send a confirmation message to your account via Telegram.