1
Fork 0
mirror of https://github.com/Steffo99/greed.git synced 2024-11-22 05:54:18 +00:00

Fix wrong query type

This commit is contained in:
Steffo 2017-12-15 09:26:53 +01:00
parent b93b615d37
commit a3870f4f88
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: C27544372FBB445D

View file

@ -103,13 +103,13 @@ def main():
# Forward the update to the worker # Forward the update to the worker
receiving_worker.queue.put(update) receiving_worker.queue.put(update)
# If the update is a inline keyboard press... # 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 # 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 # Ensure a worker exists for the chat
if receiving_worker is None: if receiving_worker is None:
# Suggest that the user restarts the chat with /start # 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 # Skip the update
continue continue
# Forward the update to the worker # Forward the update to the worker