aboutsummaryrefslogtreecommitdiff
path: root/examples/reply.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/reply.py')
-rw-r--r--examples/reply.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/reply.py b/examples/reply.py
index 2faf8a9d..b111113a 100644
--- a/examples/reply.py
+++ b/examples/reply.py
@@ -2,18 +2,18 @@ import discord
client = discord.Client()
-def on_message(message):
+async 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'):
msg = 'Hello {0.author.mention}'.format(message)
- yield from client.send_message(message.channel, msg)
+ await client.send_message(message.channel, msg)
-def on_ready():
+async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)