Skip to content

Commit 259ba09

Browse files
committed
Add checks when changing perm level
1 parent 9d4fb27 commit 259ba09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cogs/utility.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,11 @@ async def permissions_override(
12941294
self.bot.config["override_command_level"][
12951295
command.qualified_name
12961296
] = level.name
1297+
1298+
if not any(check for check in command.checks if hasattr(check, "permission_level")):
1299+
logger.debug('Command %s has no permissions check, adding invalid.', command.qualified_name)
1300+
checks.has_permissions(PermissionLevel.INVALID)(command)
1301+
12971302
await self.bot.config.update()
12981303
embed = Embed(
12991304
title="Success",

0 commit comments

Comments
 (0)