mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-25 15:24:17 +00:00
Fix wrong query type
This commit is contained in:
parent
b93b615d37
commit
a3870f4f88
1 changed files with 3 additions and 3 deletions
6
core.py
6
core.py
|
@ -103,13 +103,13 @@ def main():
|
|||
# Forward the update to the worker
|
||||
receiving_worker.queue.put(update)
|
||||
# If the update is a inline keyboard press...
|
||||
if update.inline_query is not None:
|
||||
if update.callback_query is not None:
|
||||
# Forward the update to the corresponding worker
|
||||
receiving_worker = chat_workers.get(update.inline_query.chat.id)
|
||||
receiving_worker = chat_workers.get(update.callback_query.chat.id)
|
||||
# Ensure a worker exists for the chat
|
||||
if receiving_worker is None:
|
||||
# Suggest that the user restarts the chat with /start
|
||||
bot.send_message(update.inline_query.chat.id, strings.error_no_worker_for_chat)
|
||||
bot.send_message(update.callback_query.chat.id, strings.error_no_worker_for_chat)
|
||||
# Skip the update
|
||||
continue
|
||||
# Forward the update to the worker
|
||||
|
|
Loading…
Reference in a new issue