mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Add some examples
This commit is contained in:
1 parent
3e0f09d32c
commit
a90e804192
3 files changed
+36
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import discord
|
||||
|
||||
client = discord.Client()
|
||||
client.login('email', 'password')
|
||||
|
||||
@client.event
|
||||
def on_message(message):
|
||||
if message.content.startswith('!hello'):
|
||||
client.send_message(message.channel, 'Hello was received!')
|
||||
|
||||
@client.event
|
||||
def on_ready():
|
||||
print('Logged in as')
|
||||
print(client.user.name)
|
||||
print(client.user.id)
|
||||
print('------')
|
||||
|
||||
client.run()
|
||||
Reference in new issue
Block a user