From 268e47a5ea31423e3ab3ddefb994bc32a49c40eb Mon Sep 17 00:00:00 2001 From: Myned Date: Fri, 1 Nov 2019 20:35:19 -0400 Subject: [PATCH] Add forwarding of messages sent to bot to bot owner --- src/run.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/run.py b/src/run.py index 12692f8..f637ede 100644 --- a/src/run.py +++ b/src/run.py @@ -94,6 +94,11 @@ 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'] + 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}') + await bot.process_commands(message) else: if not message.author.bot: