diff options
| author | Rapptz <[email protected]> | 2015-12-06 03:05:50 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-06 03:10:18 -0500 |
| commit | e87d54dd12c2a655e6e075abd8e2d03ce3b6d059 (patch) | |
| tree | abb8657ecc8f57b64159dc17a282f0a8c1cdb9b1 /examples/reply.py | |
| parent | Forced keyword argument for allow/deny in edit_channel_permissions (diff) | |
| download | discord.py-e87d54dd12c2a655e6e075abd8e2d03ce3b6d059.tar.xz discord.py-e87d54dd12c2a655e6e075abd8e2d03ce3b6d059.zip | |
Update example code.
Diffstat (limited to 'examples/reply.py')
| -rw-r--r-- | examples/reply.py | 10 |
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') [email protected]_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())) + msg = 'Hello {}!'.format(message.author.mention() + yield from client.send_message(message.channel, msg)) [email protected]_event def on_ready(): print('Logged in as') print(client.user.name) print(client.user.id) print('------') -client.run() +client.run('email', 'password') |