diff --git a/utils/checks.py b/utils/checks.py index 135f037..df2894a 100644 --- a/utils/checks.py +++ b/utils/checks.py @@ -30,7 +30,7 @@ async def check_not_restricted(ctx): # Get the source and destination # Source should ALWAYS be a command in this case source = from_restriction.get("source") - destination = int(from_restriction.get("destination")) + destination = from_restriction.get("destination") # Special check for what the "disable" command produces if destination == "everyone" and ctx.command.qualified_name == source: return False @@ -38,6 +38,9 @@ async def check_not_restricted(ctx): if source != ctx.command.qualified_name: continue + # If the destination isn't everyone, then it's an integer + destination = int(destination) + # This means that the type of restriction we have is `command from channel` # Which means we do not want commands to be ran in this channel if destination == ctx.channel.id: