Examples now use Python 3.5. Remove echo.py example.

This commit is contained in:
Rapptz
2016-01-06 11:34:49 -05:00
parent 51186c3ca4
commit 2ebfbbe471
8 changed files with 61 additions and 80 deletions

View File

@ -2,18 +2,18 @@ import discord
client = discord.Client()
@client.async_event
def on_message(message):
@client.event
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)
@client.async_event
def on_ready():
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)