aboutsummaryrefslogtreecommitdiff
path: root/examples/reply.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-12-06 03:05:50 -0500
committerRapptz <[email protected]>2015-12-06 03:10:18 -0500
commite87d54dd12c2a655e6e075abd8e2d03ce3b6d059 (patch)
treeabb8657ecc8f57b64159dc17a282f0a8c1cdb9b1 /examples/reply.py
parentForced keyword argument for allow/deny in edit_channel_permissions (diff)
downloaddiscord.py-e87d54dd12c2a655e6e075abd8e2d03ce3b6d059.tar.xz
discord.py-e87d54dd12c2a655e6e075abd8e2d03ce3b6d059.zip
Update example code.
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 b106675f..0324797b 100644
--- a/examples/reply.py
+++ b/examples/reply.py
@@ -1,22 +1,22 @@
import discord
client = discord.Client()
-client.login('email', 'password')
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()))
+ msg = 'Hello {}!'.format(message.author.mention()
+ yield from client.send_message(message.channel, msg))
def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
-client.run()
+client.run('email', 'password')