Add on_message_delete event and Client.messages attribute.

This commit is contained in:
Rapptz
2015-08-21 18:55:57 -04:00
parent a90e804192
commit f580441c10
3 changed files with 45 additions and 2 deletions

16
examples/deleted.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_delete(message):
client.send_message(message.channel, '{} has deleted the message:\n{}'.format(message.author.name, message.content))
client.run()