Skip to content

Commit 36aa235

Browse files
committed
text fixes
1 parent 8bd1671 commit 36aa235

File tree

3 files changed

+26
-36
lines changed

3 files changed

+26
-36
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# fjbot
22
screenlog*
3+
config.py
34

45
#PyCharm
56
.idea

cogs/member.py

+24-35
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def send_discord_id(self, ctx):
2828
profile. After logging in to the website, their profile has a Discord ID field that they can fill. Once the
2929
value is set, the account is linked.
3030
31-
:param ctx: The invocation context. The invocation context.
31+
:param ctx: The invocation context.
3232
"""
3333
user = DiscordUser(ctx.author)
3434
msg = (
@@ -49,7 +49,7 @@ async def register_user(self, ctx):
4949
registering the account. The user will have 15 seconds to respond with a `[Y/N]`. If `[Y]`, the account will
5050
attempt to register, the response is then delivered. If `[N]`, the request is cancelled.
5151
52-
:param ctx: The invocation context. The invocation context.
52+
:param ctx: The invocation context.
5353
"""
5454
embed = None
5555
user = DiscordUser(ctx.author)
@@ -98,7 +98,7 @@ async def user_login_link(self, ctx):
9898
This bypasses the website login by using a temporary token. The token expires once the link is used or
9999
5 minutes has passed.
100100
101-
:param ctx: The invocation context. The invocation context.
101+
:param ctx: The invocation context.
102102
"""
103103
user = DiscordUser(ctx.author)
104104
link = user.request_login_link()
@@ -118,7 +118,7 @@ async def user_reset_password_link(self, ctx):
118118
This bypasses the login credentials by using a temporary password. The temporary password is only valid for
119119
resetting the account's password. It expires once the password has changed or 5 minutes has passed.
120120
121-
:param ctx: The invocation context. The invocation context.
121+
:param ctx: The invocation context.
122122
"""
123123
user = DiscordUser(ctx.author)
124124
link = user.request_reset_password_link()
@@ -130,27 +130,16 @@ async def user_reset_password_link(self, ctx):
130130
@commands.command(name='commands', aliases=['misc', 'command-list'])
131131
@commands.cooldown(1, 30.0, commands.BucketType.user)
132132
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*.
134134
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.
139136
"""
140137
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:\nhttps://fancyjesse.com/projects/fjbot/command-list',
140+
user=DiscordUser(ctx.author),
141+
)
142+
await ctx.send(embed=embed)
154143

155144
@commands.command()
156145
@commands.cooldown(1, 300.0, commands.BucketType.user)
@@ -163,7 +152,7 @@ async def report(self, ctx, member: discord.Member, *, reason='no reason provide
163152
.. note::
164153
This should be used sparingly. If the Discord server has a lot of users, this may get annoying.
165154
166-
:param ctx: The invocation context. The invocation context.
155+
:param ctx: The invocation context.
167156
:param member: The Discord user being reported.
168157
:param reason: The reason for reporting the Discord user.
169158
"""
@@ -178,7 +167,7 @@ async def report(self, ctx, member: discord.Member, *, reason='no reason provide
178167
async def joined(self, ctx, member: discord.Member = None):
179168
"""Displays the date the user joined the Discord server.
180169
181-
:param ctx: The invocation context. The invocation context.
170+
:param ctx: The invocation context.
182171
:param member: The Discord user to display.
183172
"""
184173
member = member if member else ctx.author
@@ -192,7 +181,7 @@ async def joined(self, ctx, member: discord.Member = None):
192181
async def invite(self, ctx):
193182
"""Sends the Discord server invite link defined in :mod:`config`.
194183
195-
:param ctx: The invocation context. The invocation context.
184+
:param ctx: The invocation context.
196185
"""
197186
embed = quickembed.info(
198187
desc='Invite Link:\n{}\n\nInvite Bot:\n{}'.format(
@@ -206,7 +195,7 @@ async def invite(self, ctx):
206195
async def member_roles(self, ctx):
207196
"""Displays the roles the requesting user currently has in the server.
208197
209-
:param ctx: The invocation context. The invocation context.
198+
:param ctx: The invocation context.
210199
"""
211200
roles = '{}'.format([role.name for role in ctx.author.roles])
212201
embed = quickembed.info(
@@ -218,7 +207,7 @@ async def member_roles(self, ctx):
218207
async def uptime(self, ctx):
219208
"""Display the amount of time the bot has been alive.
220209
221-
:param ctx: The invocation context. The invocation context.
210+
:param ctx: The invocation context.
222211
"""
223212
embed = quickembed.info(
224213
desc='Uptime: {}'.format(datetime.now() - self.bot.start_dt),
@@ -234,7 +223,7 @@ async def countdown(self, ctx, *, start_num=5):
234223
.. note::
235224
The original message is updated to avoid spamming the chat.
236225
237-
:param ctx: The invocation context. The invocation context.
226+
:param ctx: The invocation context.
238227
:param start_num: The number to start countdown at. Must be 10 or below. Default is 5.
239228
"""
240229
start_num = 5 if start_num > 10 else start_num
@@ -256,7 +245,7 @@ async def countdown(self, ctx, *, start_num=5):
256245
async def flip_coin(self, ctx):
257246
"""Performs a basic coin flip and displays the result.
258247
259-
:param ctx: The invocation context. The invocation context.
248+
:param ctx: The invocation context.
260249
"""
261250
result = 'Heads' if random.getrandbits(1) else 'Tails'
262251
embed = quickembed.info(desc='Coin flip', user=DiscordUser(ctx.author))
@@ -267,7 +256,7 @@ async def flip_coin(self, ctx):
267256
async def roll_dice(self, ctx):
268257
"""Performs a basic dice roll and returns the result.
269258
270-
:param ctx: The invocation context. The invocation context.
259+
:param ctx: The invocation context.
271260
"""
272261
result = '[{}] [{}]'.format(random.randint(1, 6), random.randint(1, 6))
273262
embed = quickembed.info(desc='Dice roll', user=DiscordUser(ctx.author))
@@ -284,7 +273,7 @@ async def mock_member(self, ctx, member: discord.Member = None):
284273
285274
You cannot mock non-Discord user or a bot.
286275
287-
:param ctx: The invocation context. The invocation context.
276+
:param ctx: The invocation context.
288277
:param member: The Discord user to mock.
289278
"""
290279
user = DiscordUser(ctx.author)
@@ -318,7 +307,7 @@ async def slap_member(
318307
.. note::
319308
DO NOT ATTEMPT TO SLAP THE BOT.
320309
321-
:param ctx: The invocation context. The invocation context.
310+
:param ctx: The invocation context.
322311
:param member: The Discord user to slap.
323312
:param reason: The reason for the slap.
324313
"""
@@ -354,7 +343,7 @@ async def tickle_member(
354343
):
355344
"""Tickle another Discord user.
356345
357-
:param ctx: The invocation context. The invocation context.
346+
:param ctx: The invocation context.
358347
:param member: The Discord user to tickle.
359348
:param reason: The reason for the tickle.
360349
"""
@@ -392,7 +381,7 @@ async def hug_member(
392381
):
393382
"""Hug another Discord user.
394383
395-
:param ctx: The invocation context. The invocation context.
384+
:param ctx: The invocation context.
396385
:param member: The Discord user to hug.
397386
:param reason: The reason for the hug.
398387
"""
@@ -426,7 +415,7 @@ async def punch_member(
426415
):
427416
"""Punch another Discord user.
428417
429-
:param ctx: The invocation context. The invocation context.
418+
:param ctx: The invocation context.
430419
:param member: The Discord user to punch.
431420
:param reason: The reason for the punch.
432421
"""

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"sphinx.ext.doctest",
4343
'sphinx_rtd_theme',
4444
'sphinx.ext.githubpages',
45-
'm2r'
45+
'm2r',
4646
]
4747

4848
# Add any paths that contain templates here, relative to this directory.

0 commit comments

Comments
 (0)