Add on_message_edit event.

This commit is contained in:
Rapptz
2015-08-21 22:02:03 -04:00
parent 794991adb6
commit ef7dd42f28
3 changed files with 42 additions and 3 deletions

16
examples/edits.py Normal file
View File

@ -0,0 +1,16 @@
import discord
client = discord.Client()
client.login('email', 'password')
@client.event
def on_ready():
print('Connected!')
print('Username: ' + client.user.name)
print('ID: ' + client.user.id)
@client.event
def on_message_edit(before, after):
client.send_message(after.channel, '**{}** edited their message:\n{}'.format(after.author.name, before.content))
client.run()