elbekD / kt-telegram-bot

Telegram Bot Library for Kotlin language
MIT License
103 stars 19 forks source link

Respond to /command@MyUserBot #16

Closed ghost closed 4 years ago

ghost commented 4 years ago

It seems a normally functional bot will not answer to a command directed at it in the style of /command@MyUserBot

The need for this is when multiple groups in a group share similar command names. The official documentation suggests the following solution in this page: https://core.telegram.org/bots#commands

If multiple bots are in a group, it is possible to add bot usernames to commands in order to avoid confusion. This is done automatically when commands are selected via the list of suggestions. Please remember that your bot needs to be able to process commands that are followed by its username.

It seems that the COMMAND_REGEX would filter out any username appended.

elbekD commented 4 years ago

thnx for comment. will fix it in 1.2.0

elbekD commented 4 years ago

fixed. checkout 1.2.0 version

ghost commented 4 years ago

Integrated, tested, it works great, thank you!

1.2.0 looks very good.