diff --git a/main.py b/main.py index 6748635..2e7a080 100644 --- a/main.py +++ b/main.py @@ -319,12 +319,14 @@ def queue_processor(): def message_handler(update, context): global lock with lock: - if update.message.text.__class__ == str and update.message.text.startswith("$"): + if update.message and update.message.text.__class__ == str and update.message.text.startswith("$"): print("[DEBUG] Received new message with high priority") # just for testing message_queue.insert(0, update.message) - else: + elif update.message: print("[DEBUG] Received new message") # just for testing message_queue.append(update.message) + else: + print(f"[DEBUG] Received {update.message} instead of a message") # --- Final stage ---