aboutsummaryrefslogtreecommitdiff
path: root/examples/edits.py
blob: c1619cecb1dfffd7c0cf0413f161efb743cbb521 (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_edit(before, after):
    client.send_message(after.channel, '**{}** edited their message:\n{}'.format(after.author.name, before.content))

client.run()