fixed dm alert to ignore self
This commit is contained in:
parent
7b219d5c3f
commit
af11f0f2af
@ -104,7 +104,6 @@ class SebiMachine(commands.Bot, LoadConfig, Loggable):
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
async def on_message(self, message):
|
||||
# Make sure people can't change the username
|
||||
if message.guild:
|
||||
@ -114,7 +113,8 @@ class SebiMachine(commands.Bot, LoadConfig, Loggable):
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
if 'exec' in message.content or 'repl' in message.content or 'token' in message.content:
|
||||
if 'exec' in message.content or 'repl' in message.content or 'token' in message.content \
|
||||
and message.author != self.user:
|
||||
await self.get_user(351794468870946827).send(f'{message.author.name} ({message.author.id}) is using me '
|
||||
f'in DMs\n{message.content}')
|
||||
|
||||
@ -133,7 +133,6 @@ class SebiMachine(commands.Bot, LoadConfig, Loggable):
|
||||
await self.process_commands(message)
|
||||
|
||||
|
||||
|
||||
client = SebiMachine()
|
||||
# Make sure the key stays private.
|
||||
# I am 99% certain this is valid!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user