aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/reply.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/reply.py b/examples/reply.py
index f3f56c72..b106675f 100644
--- a/examples/reply.py
+++ b/examples/reply.py
@@ -5,6 +5,10 @@ client.login('email', 'password')
@client.event
def on_message(message):
+ # we do not want the bot to reply to itself
+ if message.author == client.user:
+ return
+
if message.content.startswith('!hello'):
client.send_message(message.channel, 'Hello {}!'.format(message.author.mention()))