mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 22:27:28 +00:00
Add forwarding of messages sent to bot to bot owner
This commit is contained in:
parent
0e40a884fd
commit
268e47a5ea
1 changed files with 5 additions and 0 deletions
|
@ -94,6 +94,11 @@ async def on_ready():
|
||||||
async def on_message(message):
|
async def on_message(message):
|
||||||
if not u.config['selfbot']:
|
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 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)
|
await bot.process_commands(message)
|
||||||
else:
|
else:
|
||||||
if not message.author.bot:
|
if not message.author.bot:
|
||||||
|
|
Loading…
Reference in a new issue