Quick start example doesn't respond to ourselves.
This commit is contained in:
parent
21fd94a449
commit
4564b46f95
@ -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...')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user