Skip to content

Commit faeaf49

Browse files
committed
Fixed typos
1 parent 7bed1b8 commit faeaf49

File tree

6 files changed

+44
-41
lines changed

6 files changed

+44
-41
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ celerybeat-schedule
9393
.venv
9494
env/
9595
venv/
96+
venv2/
9697
ENV/
9798
env.bak/
9899
venv.bak/

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ celerybeat-schedule
9393
.venv
9494
env/
9595
venv/
96+
venv2/
9697
ENV/
9798
env.bak/
9899
venv.bak/

cogs/modmail.py

+23-23
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ async def setup(self, ctx):
100100
)
101101

102102
embed.add_field(
103-
name="Thanks for using the bot!",
103+
name="Thanks for using our bot!",
104104
value="If you like what you see, consider giving the "
105-
"[repo a star](https://github.com/kyb3r/modmail) :star: or if you are "
106-
"feeling generous, check us out on [Patreon](https://patreon.com/kyber)!",
105+
"[repo a star](https://github.com/kyb3r/modmail) :star: and if you are "
106+
"feeling extra generous, buy us coffee on [Patreon](https://patreon.com/kyber) :heart:!",
107107
)
108108

109109
embed.set_footer(text=f'Type "{self.bot.prefix}help" for a complete list of commands.')
@@ -115,8 +115,8 @@ async def setup(self, ctx):
115115
await self.bot.config.update()
116116
await ctx.send(
117117
"**Successfully set up server.**\n"
118-
"Consider setting permission levels "
119-
"to give access to roles or users the ability to use Modmail.\n\n"
118+
"Consider setting permission levels to give access to roles "
119+
"or users the ability to use Modmail.\n\n"
120120
f"Type:\n- `{self.bot.prefix}permissions` and `{self.bot.prefix}permissions add` "
121121
"for more info on setting permissions.\n"
122122
f"- `{self.bot.prefix}config help` for a list of available customizations."
@@ -162,7 +162,7 @@ async def snippet(self, ctx, *, name: str.lower = None):
162162
embed = discord.Embed(
163163
color=self.bot.error_color, description="You dont have any snippets at the moment."
164164
)
165-
embed.set_footer(text=f"Do {self.bot.prefix}help snippet for more commands.")
165+
embed.set_footer(text=f'Check "{self.bot.prefix}help snippet" to add a snippet.')
166166
embed.set_author(name="Snippets", icon_url=ctx.guild.icon_url)
167167
return await ctx.send(embed=embed)
168168

@@ -211,7 +211,7 @@ async def snippet_add(self, ctx, name: str.lower, *, value: commands.clean_conte
211211
embed = discord.Embed(
212212
title="Error",
213213
color=self.bot.error_color,
214-
description=f"An alias with the same name already exists: `{name}`.",
214+
description=f"An alias that shares the same name exists: `{name}`.",
215215
)
216216
return await ctx.send(embed=embed)
217217

@@ -397,15 +397,15 @@ async def notify(
397397
"""
398398
Notify a user or role when the next thread message received.
399399
400-
Once a thread message is received, `user_or_role` will only be pinged once.
400+
Once a thread message is received, `user_or_role` will be pinged once.
401401
402402
Leave `user_or_role` empty to notify yourself.
403403
`@here` and `@everyone` can be substituted with `here` and `everyone`.
404404
`user_or_role` may be a user ID, mention, name. role ID, mention, name, "everyone", or "here".
405405
"""
406406
mention = self.parse_user_or_role(ctx, user_or_role)
407407
if mention is None:
408-
raise commands.BadArgument(f"{user_or_role} is not a valid role.")
408+
raise commands.BadArgument(f"{user_or_role} is not a valid user or role.")
409409

410410
thread = ctx.thread
411411

@@ -482,7 +482,7 @@ async def subscribe(
482482
"""
483483
mention = self.parse_user_or_role(ctx, user_or_role)
484484
if mention is None:
485-
raise commands.BadArgument(f"{user_or_role} is not a valid role.")
485+
raise commands.BadArgument(f"{user_or_role} is not a valid user or role.")
486486

487487
thread = ctx.thread
488488

@@ -539,7 +539,7 @@ async def unsubscribe(
539539
await self.bot.config.update()
540540
embed = discord.Embed(
541541
color=self.bot.main_color,
542-
description=f"{mention} is now unsubscribed to this thread.",
542+
description=f"{mention} is now unsubscribed from this thread.",
543543
)
544544
return await ctx.send(embed=embed)
545545

@@ -649,7 +649,7 @@ async def logs(self, ctx, *, user: User = None):
649649
)
650650
return await ctx.send(embed=embed)
651651

652-
logs = reversed([e for e in logs if not e["open"]])
652+
logs = reversed([log for log in logs if not log["open"]])
653653

654654
embeds = self.format_log_embeds(logs, avatar_url=icon_url)
655655

@@ -678,7 +678,7 @@ async def logs_closed_by(self, ctx, *, user: User = None):
678678
if not embeds:
679679
embed = discord.Embed(
680680
color=self.bot.error_color,
681-
description="No log entries have been found for that query",
681+
description="No log entries have been found for that query.",
682682
)
683683
return await ctx.send(embed=embed)
684684

@@ -838,8 +838,8 @@ async def edit(self, ctx, message_id: Optional[int] = None, *, message: str):
838838
"""
839839
Edit a message that was sent using the reply or anonreply command.
840840
841-
If no `message_id` is provided, the
842-
last message sent by a staff will be edited.
841+
If no `message_id` is provided,
842+
the last message sent by a staff will be edited.
843843
"""
844844
thread = ctx.thread
845845

@@ -1037,7 +1037,7 @@ async def block(self, ctx, user: Optional[User] = None, *, after: UserFriendlyTi
10371037
elif after is None:
10381038
raise commands.MissingRequiredArgument(SimpleNamespace(name="user"))
10391039
else:
1040-
raise commands.BadArgument(f'User "{after.arg}" not found')
1040+
raise commands.BadArgument(f'User "{after.arg}" not found.')
10411041

10421042
mention = getattr(user, "mention", f"`{user.id}`")
10431043

@@ -1069,8 +1069,8 @@ async def block(self, ctx, user: Optional[User] = None, *, after: UserFriendlyTi
10691069
old_reason = msg.strip().rstrip(".")
10701070
embed = discord.Embed(
10711071
title="Success",
1072-
description=f"{mention} was previously blocked "
1073-
f"{old_reason}.\n{mention} is now blocked {reason}",
1072+
description=f"{mention} was previously blocked {old_reason}.\n"
1073+
f"{mention} is now blocked {reason}",
10741074
color=self.bot.main_color,
10751075
)
10761076
else:
@@ -1116,14 +1116,14 @@ async def unblock(self, ctx, *, user: User = None):
11161116
reason = msg[16:].strip().rstrip(".") or "no reason"
11171117
embed = discord.Embed(
11181118
title="Success",
1119-
description=f"{mention} was previously blocked internally "
1120-
f"{reason}.\n{mention} is no longer blocked.",
1119+
description=f"{mention} was previously blocked internally {reason}.\n"
1120+
f"{mention} is no longer blocked.",
11211121
color=self.bot.main_color,
11221122
)
11231123
embed.set_footer(
11241124
text="However, if the original system block reason still applies, "
1125-
f"{name} will be automatically blocked again. Use "
1126-
f'"{self.bot.prefix}blocked whitelist {user.id}" to whitelist the user.'
1125+
f"{name} will be automatically blocked again. "
1126+
f'Use "{self.bot.prefix}blocked whitelist {user.id}" to whitelist the user.'
11271127
)
11281128
else:
11291129
embed = discord.Embed(
@@ -1156,7 +1156,7 @@ async def delete(self, ctx, message_id: Optional[int] = None):
11561156
try:
11571157
message_id = int(message_id)
11581158
except ValueError:
1159-
raise commands.BadArgument("An integer message ID needs to be specified.")
1159+
raise commands.BadArgument("A message ID needs to be specified.")
11601160

11611161
linked_message_id = await self.find_linked_message(ctx, message_id)
11621162

cogs/utility.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ async def send_error_message(self, error):
184184
for i, val in enumerate(values, start=1):
185185
embed.description += f"\n{i}: {escape_markdown(val)}"
186186
embed.set_footer(
187-
text=f'Type "{self.clean_prefix}{self.command_attrs["name"]} alias" for more '
188-
"details on aliases."
187+
text=f'Type "{self.clean_prefix}{self.command_attrs["name"]} alias" '
188+
"for more details on aliases."
189189
)
190190
return await self.get_destination().send(embed=embed)
191191

@@ -237,7 +237,7 @@ def cog_unload(self):
237237
async def changelog(self, ctx, version: str.lower = ""):
238238
"""Shows the changelog of the Modmail."""
239239
changelog = await Changelog.from_url(self.bot)
240-
version = version.lstrip("vV") if version else changelog.latest_version.version
240+
version = version.lstrip("v") if version else changelog.latest_version.version
241241

242242
try:
243243
index = [v.version for v in changelog.versions].index(version)
@@ -264,7 +264,7 @@ async def changelog(self, ctx, version: str.lower = ""):
264264
f"View the changelog here: {changelog.latest_version.changelog_url}#v{version[::2]}"
265265
)
266266

267-
@commands.command(aliases=["bot", "info"])
267+
@commands.command(aliases=["info"])
268268
@checks.has_permissions(PermissionLevel.REGULAR)
269269
@utils.trigger_typing
270270
async def about(self, ctx):
@@ -345,7 +345,7 @@ async def sponsors(self, ctx):
345345
@checks.has_permissions(PermissionLevel.OWNER)
346346
@utils.trigger_typing
347347
async def debug(self, ctx):
348-
"""Shows the recent application-logs of the bot."""
348+
"""Shows the recent application logs of the bot."""
349349

350350
log_file_name = self.bot.token.split(".")[0]
351351

@@ -368,23 +368,23 @@ async def debug(self, ctx):
368368

369369
messages = []
370370

371-
# Using Scala formatting because it's similar to Python for exceptions
371+
# Using Haskell formatting because it's similar to Python for exceptions
372372
# and it does a fine job formatting the logs.
373-
msg = "```Scala\n"
373+
msg = "```Haskell\n"
374374

375375
for line in logs.splitlines(keepends=True):
376-
if msg != "```Scala\n":
376+
if msg != "```Haskell\n":
377377
if len(line) + len(msg) + 3 > 2000:
378378
msg += "```"
379379
messages.append(msg)
380-
msg = "```Scala\n"
380+
msg = "```Haskell\n"
381381
msg += line
382382
if len(msg) + 3 > 2000:
383383
msg = msg[:1993] + "[...]```"
384384
messages.append(msg)
385-
msg = "```Scala\n"
385+
msg = "```Haskell\n"
386386

387-
if msg != "```Scala\n":
387+
if msg != "```Haskell\n":
388388
msg += "```"
389389
messages.append(msg)
390390

@@ -1043,7 +1043,7 @@ async def alias_add(self, ctx, name: str.lower, *, value):
10431043
else:
10441044
embed.description = (
10451045
"The command you are attempting to point "
1046-
f"to n step {i} does not exist: `{linked_command}`."
1046+
f"to in step {i} does not exist: `{linked_command}`."
10471047
)
10481048

10491049
return await ctx.send(embed=embed)
@@ -1266,7 +1266,7 @@ async def permissions_add(
12661266
- `{prefix}perms add command "plugin enabled" @role`
12671267
- `{prefix}perms add command help 984301093849028`
12681268
1269-
Do not ping `@everyone` for granting permission to everyone, use "everyone" or "all" instead,
1269+
Do not ping `@everyone` for granting permission to everyone, use "everyone" or "all" instead.
12701270
"""
12711271

12721272
if type_ not in {"command", "level"}:
@@ -1342,7 +1342,7 @@ async def permissions_remove(
13421342
- `{prefix}perms remove override block`
13431343
- `{prefix}perms remove override "snippet add"`
13441344
1345-
Do not ping `@everyone` for granting permission to everyone, use "everyone" or "all" instead,
1345+
Do not ping `@everyone` for granting permission to everyone, use "everyone" or "all" instead.
13461346
"""
13471347
if type_ not in {"command", "level", "override"} or (
13481348
type_ != "override" and user_or_role is None
@@ -1484,7 +1484,7 @@ async def permissions_get(
14841484
- `{prefix}perms get override block`
14851485
- `{prefix}perms get override permissions add`
14861486
1487-
Do not ping `@everyone` for granting permission to everyone, use "everyone" or "all" instead,
1487+
Do not ping `@everyone` for granting permission to everyone, use "everyone" or "all" instead.
14881488
"""
14891489

14901490
if name is None and user_or_role not in {"command", "level", "override"}:

core/time.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ def convert(self, ctx, argument):
120120
# so let me handle the 'now' case
121121
if argument.endswith(" from now"):
122122
argument = argument[:-9].strip()
123-
# handles "for xxx hours"
124-
if argument.startswith("for "):
125-
argument = argument[4:].strip()
123+
# handles "in xxx hours"
124+
if argument.startswith("in "):
125+
argument = argument[3:].strip()
126126

127127
elements = calendar.nlp(argument, sourceTime=self.now)
128128
if elements is None or not elements:

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ exclude = '''
99
| \.git
1010
| \.venv
1111
| venv
12+
| venv2
1213
| _build
1314
| build
1415
| dist

0 commit comments

Comments
 (0)