diff options
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') |