blob: 2faf8a9d549b78a0e9dab6dbd67e62a7ff01bc7a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import discord
client = discord.Client()
@client.async_event
def on_message(message):
# we do not want the bot to reply to itself
if message.author == client.user:
return
if message.content.startswith('!hello'):
msg = 'Hello {0.author.mention}'.format(message)
yield from client.send_message(message.channel, msg)
@client.async_event
def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
client.run('email', 'password')
|