fix(bot): 🐛 Disabled channels allowing commands to be ran in them.
This commit is contained in:
@@ -432,6 +432,9 @@ async def is_channel_enabled(ctx: commands.Context) -> Literal[True]:
|
||||
if channel.enabled:
|
||||
return True
|
||||
|
||||
if channel.enabled is False:
|
||||
raise exceptions.ChannelDisabledError()
|
||||
|
||||
if await models.Channel.filter(server_id=server_id, enabled=True).exists():
|
||||
raise exceptions.ChannelDisabledError()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user