You'll need to pass each option to filter.commands, including the variants with the bot name.
If you're looking for a more dynamic solution, you can use something like
commands = [ 'hello', 'world' ]
myBot = 'myBotName'
for i in range(len(commands)):
commands.append(commands[i] + "@" + myBot)
print(commands)
// ['hello', 'world', 'hello@myBotName', 'world@myBotName']
That will loop over a list of commands, and the same command with the bot name attached.
For even more copy/paste logic, you can retrieve the bot name from pyrogram itself.
If we take a look at Pyrogram's User class; we'll see the following data:
- username (str, optional) – User’s or bot’s username.
[Link to documentation]
This seems like a perfect fit to automate the myBot variable in my example above.
filters.command(["my_command", "my_command@myBot"]