Skip to content

Extract bot name from a command #2144

@vehlwn

Description

@vehlwn
  1. pyTelegramBotAPI 4.15.3
  2. Arch Linux
  3. Python 3.11.6

Is there any way to filter messages by bot tag like /get@botName? For now I'm registering my commands with bot.register_message_handler(help_handler, commands=["help"]) and when there are multiple bots in a group command /help@other_bot triggers @other_bot as well as my bot. I've found functions extract_arguments and extract_command in telebot.util module, bot no function to extract mentioned bot name from a command (https://pytba.readthedocs.io/en/latest/util.html#telebot.util.extract_arguments).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions