summaryrefslogtreecommitdiff
path: root/src/home/telegram
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-11-07 00:56:24 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-11-07 00:56:24 +0300
commit91aff8bc85df529206124452d8bca93b2a23478d (patch)
treeeed7aa069bbfdf2255efe8995e9fc958200d9378 /src/home/telegram
parent5f4a14dac4a34c02ce180bec5b4a2e37bd4d1817 (diff)
sound_bot: fixes
Diffstat (limited to 'src/home/telegram')
-rw-r--r--src/home/telegram/bot.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/home/telegram/bot.py b/src/home/telegram/bot.py
index 1a58412..9044b07 100644
--- a/src/home/telegram/bot.py
+++ b/src/home/telegram/bot.py
@@ -129,7 +129,10 @@ def callbackhandler(**kwargs):
@wraps(f)
def _handler(*args, **kwargs):
return _handler_of_handler(f=f, *args, **kwargs)
- _updater.dispatcher.add_handler(CallbackQueryHandler(_handler, pattern=kwargs['callback']), group=0)
+ pattern_kwargs = {}
+ if kwargs['callback'] != '*':
+ pattern_kwargs['pattern'] = kwargs['callback']
+ _updater.dispatcher.add_handler(CallbackQueryHandler(_handler, **pattern_kwargs), group=0)
return _handler
return inner