Fix bug that stopped disabling from working
This commit is contained in:
parent
05e2b10c8e
commit
d47718ea3b
|
@ -30,7 +30,7 @@ async def check_not_restricted(ctx):
|
||||||
# Get the source and destination
|
# Get the source and destination
|
||||||
# Source should ALWAYS be a command in this case
|
# Source should ALWAYS be a command in this case
|
||||||
source = from_restriction.get("source")
|
source = from_restriction.get("source")
|
||||||
destination = int(from_restriction.get("destination"))
|
destination = from_restriction.get("destination")
|
||||||
# Special check for what the "disable" command produces
|
# Special check for what the "disable" command produces
|
||||||
if destination == "everyone" and ctx.command.qualified_name == source:
|
if destination == "everyone" and ctx.command.qualified_name == source:
|
||||||
return False
|
return False
|
||||||
|
@ -38,6 +38,9 @@ async def check_not_restricted(ctx):
|
||||||
if source != ctx.command.qualified_name:
|
if source != ctx.command.qualified_name:
|
||||||
continue
|
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`
|
# 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
|
# Which means we do not want commands to be ran in this channel
|
||||||
if destination == ctx.channel.id:
|
if destination == ctx.channel.id:
|
||||||
|
|
Loading…
Reference in a new issue