aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2020-07-19 21:13:08 +0800
committerGravatar kosayoda <[email protected]>2020-07-19 21:13:08 +0800
commit4ef9770ed26b46bc5916f4147acce1cf57f4f9af (patch)
tree794c2e6e44e51a2461d076a6d3063bc167470bda
parentFix incorrect typehint and shorten method name (diff)
Rename method to improve readability
-rw-r--r--bot/cogs/reminders.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py
index d36494a69..6755993a0 100644
--- a/bot/cogs/reminders.py
+++ b/bot/cogs/reminders.py
@@ -104,7 +104,7 @@ class Reminders(Cog):
await ctx.send(embed=embed)
@staticmethod
- async def allow_mentions(ctx: Context, mentions: t.List[Mentionable]) -> t.Tuple[bool, str]:
+ async def check_mentions(ctx: Context, mentions: t.List[Mentionable]) -> t.Tuple[bool, str]:
"""
Returns whether or not the list of mentions is allowed.
@@ -228,7 +228,7 @@ class Reminders(Cog):
# Filter mentions to see if the user can mention members/roles
if mentions:
- mentions_allowed, disallowed_mentions = await self.allow_mentions(ctx, mentions)
+ mentions_allowed, disallowed_mentions = await self.check_mentions(ctx, mentions)
if not mentions_allowed:
return await send_denial(
ctx, f"You can't mention other {disallowed_mentions} in your reminder!"
@@ -378,7 +378,7 @@ class Reminders(Cog):
async def edit_reminder_mentions(self, ctx: Context, id_: int, mentions: Greedy[Mentionable]) -> None:
"""Edit one of your reminder's mentions."""
# Filter mentions to see if the user can mention members/roles
- mentions_allowed, disallowed_mentions = await self.allow_mentions(ctx, mentions)
+ mentions_allowed, disallowed_mentions = await self.check_mentions(ctx, mentions)
if not mentions_allowed:
return await send_denial(
ctx, f"You can't mention other {disallowed_mentions} in your reminder!"