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