Wildcard For Any String - Telegram-bot
Well, i`m using the telegram bot Updater to handle messages from sent to it. But, I wanted it to respond to any string I give, with an '#' before. Tried the AnyString method, but d
Solution 1:
You can use a PrefixHandler (docs)
Examples:
Single prefix and command:
PrefixHandler('!', 'test', callback) will respond to '!test'.
Multiple prefixes, single command:
PrefixHandler(['!', '#'], 'test', callback) will respond to '!test' and
'#test'.
Miltiple prefixes and commands:
PrefixHandler(['!', '#'], ['test', 'help`], callback) will respond to '!test',
'#test', '!help' and '#help'.
Post a Comment for "Wildcard For Any String - Telegram-bot"