mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 19:03:03 +00:00
Quick start example doesn't respond to ourselves.
This commit is contained in:
@ -64,6 +64,10 @@ class MyClient(discord.Client):
|
||||
print('------')
|
||||
|
||||
async def on_message(self, message):
|
||||
# don't respond to ourselves
|
||||
if message.author == self.user:
|
||||
return
|
||||
|
||||
if message.content.startswith('!test'):
|
||||
counter = 0
|
||||
tmp = await message.channel.send('Calculating messages...')
|
||||
|
Reference in New Issue
Block a user