aboutsummaryrefslogtreecommitdiff
path: root/examples/echo.py
blob: ce5eef9010c9b7136481e3046cda4801d8f10de6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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(message):
    if message.author.id != client.user.id:
        client.send_message(message.channel, message.content)

client.run()