diff --git a/src/discord/queue.py b/src/discord/queue.py index d8659d0..9777287 100644 --- a/src/discord/queue.py +++ b/src/discord/queue.py @@ -174,14 +174,14 @@ def send_to_discord(data: Optional[DiscordMessage], meta: DiscordMessageMetadata logger.info("Message \"{}\" has been rejected due to matching filter ({}).".format( to_check, regex)) return # discard the message without anything - if messagequeue: + if messagequeue: + messagequeue.add_message((data, meta)) + else: + code = send_to_discord_webhook(data, metadata=meta) + if code == 3: messagequeue.add_message((data, meta)) - else: - code = send_to_discord_webhook(data, metadata=meta) - if code == 3: - messagequeue.add_message((data, meta)) - elif code == 2: - time.sleep(5.0) - messagequeue.add_message((data, meta)) - elif code < 2: - pass \ No newline at end of file + elif code == 2: + time.sleep(5.0) + messagequeue.add_message((data, meta)) + elif code < 2: + pass \ No newline at end of file