@@ -28,7 +28,7 @@ async def send_discord_id(self, ctx):
28
28
profile. After logging in to the website, their profile has a Discord ID field that they can fill. Once the
29
29
value is set, the account is linked.
30
30
31
- :param ctx: The invocation context. The invocation context.
31
+ :param ctx: The invocation context.
32
32
"""
33
33
user = DiscordUser (ctx .author )
34
34
msg = (
@@ -49,7 +49,7 @@ async def register_user(self, ctx):
49
49
registering the account. The user will have 15 seconds to respond with a `[Y/N]`. If `[Y]`, the account will
50
50
attempt to register, the response is then delivered. If `[N]`, the request is cancelled.
51
51
52
- :param ctx: The invocation context. The invocation context.
52
+ :param ctx: The invocation context.
53
53
"""
54
54
embed = None
55
55
user = DiscordUser (ctx .author )
@@ -98,7 +98,7 @@ async def user_login_link(self, ctx):
98
98
This bypasses the website login by using a temporary token. The token expires once the link is used or
99
99
5 minutes has passed.
100
100
101
- :param ctx: The invocation context. The invocation context.
101
+ :param ctx: The invocation context.
102
102
"""
103
103
user = DiscordUser (ctx .author )
104
104
link = user .request_login_link ()
@@ -118,7 +118,7 @@ async def user_reset_password_link(self, ctx):
118
118
This bypasses the login credentials by using a temporary password. The temporary password is only valid for
119
119
resetting the account's password. It expires once the password has changed or 5 minutes has passed.
120
120
121
- :param ctx: The invocation context. The invocation context.
121
+ :param ctx: The invocation context.
122
122
"""
123
123
user = DiscordUser (ctx .author )
124
124
link = user .request_reset_password_link ()
@@ -130,27 +130,16 @@ async def user_reset_password_link(self, ctx):
130
130
@commands .command (name = 'commands' , aliases = ['misc' , 'command-list' ])
131
131
@commands .cooldown (1 , 30.0 , commands .BucketType .user )
132
132
async def misc_commands (self , ctx ):
133
- """Sends the list of available *dumb commands* to the user through DM .
133
+ """Sends a link to the list of available *dumb commands*.
134
134
135
- .. note::
136
- The content is split up into multiple messages if too large.
137
-
138
- :param ctx: The invocation context. The invocation context.
135
+ :param ctx: The invocation context.
139
136
"""
140
137
user = DiscordUser (ctx .author )
141
- rows = user .chatroom_command_list ()
142
- msg = ''
143
- for row in rows :
144
- msg = msg + row ['command' ] + '\n '
145
- if len (msg ) > 1000 :
146
- msg = msg + '...'
147
- embed = quickembed .info (desc = 'Chat Commands' , user = user )
148
- embed .add_field (name = '\u200b ' , value = msg , inline = False )
149
- await ctx .author .send (embed = embed )
150
- msg = '...\n '
151
- embed = quickembed .info (desc = 'Chat Commands' , user = user )
152
- embed .add_field (name = '\u200b ' , value = msg , inline = False )
153
- await ctx .author .send (embed = embed )
138
+ embed = quickembed .info (
139
+ desc = 'FJBot Command:\n https://fancyjesse.com/projects/fjbot/command-list' ,
140
+ user = DiscordUser (ctx .author ),
141
+ )
142
+ await ctx .send (embed = embed )
154
143
155
144
@commands .command ()
156
145
@commands .cooldown (1 , 300.0 , commands .BucketType .user )
@@ -163,7 +152,7 @@ async def report(self, ctx, member: discord.Member, *, reason='no reason provide
163
152
.. note::
164
153
This should be used sparingly. If the Discord server has a lot of users, this may get annoying.
165
154
166
- :param ctx: The invocation context. The invocation context.
155
+ :param ctx: The invocation context.
167
156
:param member: The Discord user being reported.
168
157
:param reason: The reason for reporting the Discord user.
169
158
"""
@@ -178,7 +167,7 @@ async def report(self, ctx, member: discord.Member, *, reason='no reason provide
178
167
async def joined (self , ctx , member : discord .Member = None ):
179
168
"""Displays the date the user joined the Discord server.
180
169
181
- :param ctx: The invocation context. The invocation context.
170
+ :param ctx: The invocation context.
182
171
:param member: The Discord user to display.
183
172
"""
184
173
member = member if member else ctx .author
@@ -192,7 +181,7 @@ async def joined(self, ctx, member: discord.Member = None):
192
181
async def invite (self , ctx ):
193
182
"""Sends the Discord server invite link defined in :mod:`config`.
194
183
195
- :param ctx: The invocation context. The invocation context.
184
+ :param ctx: The invocation context.
196
185
"""
197
186
embed = quickembed .info (
198
187
desc = 'Invite Link:\n {}\n \n Invite Bot:\n {}' .format (
@@ -206,7 +195,7 @@ async def invite(self, ctx):
206
195
async def member_roles (self , ctx ):
207
196
"""Displays the roles the requesting user currently has in the server.
208
197
209
- :param ctx: The invocation context. The invocation context.
198
+ :param ctx: The invocation context.
210
199
"""
211
200
roles = '{}' .format ([role .name for role in ctx .author .roles ])
212
201
embed = quickembed .info (
@@ -218,7 +207,7 @@ async def member_roles(self, ctx):
218
207
async def uptime (self , ctx ):
219
208
"""Display the amount of time the bot has been alive.
220
209
221
- :param ctx: The invocation context. The invocation context.
210
+ :param ctx: The invocation context.
222
211
"""
223
212
embed = quickembed .info (
224
213
desc = 'Uptime: {}' .format (datetime .now () - self .bot .start_dt ),
@@ -234,7 +223,7 @@ async def countdown(self, ctx, *, start_num=5):
234
223
.. note::
235
224
The original message is updated to avoid spamming the chat.
236
225
237
- :param ctx: The invocation context. The invocation context.
226
+ :param ctx: The invocation context.
238
227
:param start_num: The number to start countdown at. Must be 10 or below. Default is 5.
239
228
"""
240
229
start_num = 5 if start_num > 10 else start_num
@@ -256,7 +245,7 @@ async def countdown(self, ctx, *, start_num=5):
256
245
async def flip_coin (self , ctx ):
257
246
"""Performs a basic coin flip and displays the result.
258
247
259
- :param ctx: The invocation context. The invocation context.
248
+ :param ctx: The invocation context.
260
249
"""
261
250
result = 'Heads' if random .getrandbits (1 ) else 'Tails'
262
251
embed = quickembed .info (desc = 'Coin flip' , user = DiscordUser (ctx .author ))
@@ -267,7 +256,7 @@ async def flip_coin(self, ctx):
267
256
async def roll_dice (self , ctx ):
268
257
"""Performs a basic dice roll and returns the result.
269
258
270
- :param ctx: The invocation context. The invocation context.
259
+ :param ctx: The invocation context.
271
260
"""
272
261
result = '[{}] [{}]' .format (random .randint (1 , 6 ), random .randint (1 , 6 ))
273
262
embed = quickembed .info (desc = 'Dice roll' , user = DiscordUser (ctx .author ))
@@ -284,7 +273,7 @@ async def mock_member(self, ctx, member: discord.Member = None):
284
273
285
274
You cannot mock non-Discord user or a bot.
286
275
287
- :param ctx: The invocation context. The invocation context.
276
+ :param ctx: The invocation context.
288
277
:param member: The Discord user to mock.
289
278
"""
290
279
user = DiscordUser (ctx .author )
@@ -318,7 +307,7 @@ async def slap_member(
318
307
.. note::
319
308
DO NOT ATTEMPT TO SLAP THE BOT.
320
309
321
- :param ctx: The invocation context. The invocation context.
310
+ :param ctx: The invocation context.
322
311
:param member: The Discord user to slap.
323
312
:param reason: The reason for the slap.
324
313
"""
@@ -354,7 +343,7 @@ async def tickle_member(
354
343
):
355
344
"""Tickle another Discord user.
356
345
357
- :param ctx: The invocation context. The invocation context.
346
+ :param ctx: The invocation context.
358
347
:param member: The Discord user to tickle.
359
348
:param reason: The reason for the tickle.
360
349
"""
@@ -392,7 +381,7 @@ async def hug_member(
392
381
):
393
382
"""Hug another Discord user.
394
383
395
- :param ctx: The invocation context. The invocation context.
384
+ :param ctx: The invocation context.
396
385
:param member: The Discord user to hug.
397
386
:param reason: The reason for the hug.
398
387
"""
@@ -426,7 +415,7 @@ async def punch_member(
426
415
):
427
416
"""Punch another Discord user.
428
417
429
- :param ctx: The invocation context. The invocation context.
418
+ :param ctx: The invocation context.
430
419
:param member: The Discord user to punch.
431
420
:param reason: The reason for the punch.
432
421
"""
0 commit comments