From 49c1c90de0572f6329cf5318f8258cbfa76da970 Mon Sep 17 00:00:00 2001 From: Myned Date: Fri, 1 Nov 2019 20:45:31 -0400 Subject: [PATCH] Fix forwarding all messages instead of ones only sent to bot --- src/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/run.py b/src/run.py index f637ede..7854a33 100644 --- a/src/run.py +++ b/src/run.py @@ -94,7 +94,8 @@ async def on_ready(): async def on_message(message): if not u.config['selfbot']: if message.author is not bot.user and not message.author.bot and message.author.id not in u.block['user_ids']: - if (message.author.id != u.config['owner_id'] + if (message.guild is None + and message.author.id != u.config['owner_id'] and not any(s in u.config['prefix'] for s in (message.content[:1], message.content[:2]))): await bot.get_user(u.config['owner_id']).send( f'**@{message.author.name}#{message.author.discriminator}:**\n{message.content}')