aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs/moderation.py
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2019-09-17 05:05:52 +1000
committerGravatar scragly <[email protected]>2019-09-17 05:05:52 +1000
commit230bd00695ac6be5b0dd0907ead776d48e153da2 (patch)
tree358703e95093e7f83aca33b529c54abbfd6a22a3 /bot/cogs/moderation.py
parentUpdate discord.py version to 1.2.3 (diff)
Adjust to new cog method names.
Diffstat (limited to '')
-rw-r--r--bot/cogs/moderation.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/cogs/moderation.py b/bot/cogs/moderation.py
index fcbadd235..c631dd69d 100644
--- a/bot/cogs/moderation.py
+++ b/bot/cogs/moderation.py
@@ -1375,13 +1375,15 @@ class Moderation(Scheduler, Cog):
# endregion
- async def __error(self, ctx: Context, error) -> None:
+ @staticmethod
+ async def cog_command_error(ctx: Context, error) -> None:
if isinstance(error, BadUnionArgument):
if User in error.converters:
await ctx.send(str(error.errors[0]))
error.handled = True
- async def respect_role_hierarchy(self, ctx: Context, target: UserTypes, infr_type: str) -> bool:
+ @staticmethod
+ async def respect_role_hierarchy(ctx: Context, target: UserTypes, infr_type: str) -> bool:
"""
Check if the highest role of the invoking member is greater than that of the target member.
If this check fails, a warning is sent to the invoking ctx.