aboutsummaryrefslogtreecommitdiff
path: root/examples/deleted.py
blob: 6116101331fe2f1375a2cbe8fc6076b5c5ebf699 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()