File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -74,18 +74,18 @@ Quick Example
74
74
75
75
class MyClient (discord .Client ):
76
76
async def on_ready (self ):
77
- print (' Logged on as' , self .user)
77
+ print (" Logged on as" , self .user)
78
78
79
79
async def on_message (self , message ):
80
80
# don't respond to ourselves
81
81
if message.author == self .user:
82
82
return
83
83
84
- if message.content == ' ping' :
85
- await message.channel.send(' pong' )
84
+ if message.content == " ping" :
85
+ await message.channel.send(" pong" )
86
86
87
87
client = MyClient()
88
- client.run(' token' )
88
+ client.run(" token" )
89
89
90
90
Bot Example
91
91
~~~~~~~~~~~~~
@@ -95,13 +95,13 @@ Bot Example
95
95
import discord
96
96
from discord.ext import commands
97
97
98
- bot = commands.Bot(command_prefix = ' > ' )
98
+ bot = commands.Bot(command_prefix = " > " )
99
99
100
100
@bot.command ()
101
101
async def ping (ctx ):
102
- await ctx.send(' pong' )
102
+ await ctx.send(" pong" )
103
103
104
- bot.run(' token' )
104
+ bot.run(" token" )
105
105
106
106
You can find more examples in the examples directory.
107
107
You can’t perform that action at this time.
0 commit comments