mirror of
https://github.com/myned/modufur.git
synced 2024-12-25 06:37:29 +00:00
Fix forwarding all messages instead of ones only sent to bot
This commit is contained in:
parent
268e47a5ea
commit
49c1c90de0
1 changed files with 2 additions and 1 deletions
|
@ -94,7 +94,8 @@ 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']
|
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]))):
|
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(
|
await bot.get_user(u.config['owner_id']).send(
|
||||||
f'**@{message.author.name}#{message.author.discriminator}:**\n{message.content}')
|
f'**@{message.author.name}#{message.author.discriminator}:**\n{message.content}')
|
||||||
|
|
Loading…
Reference in a new issue