fix(bot): 🐛 Disabled channels allowing commands to be ran in them.

This commit is contained in:
Nyeki.py
2024-10-19 21:36:42 -03:00
parent 0e71148c03
commit a7a1183a8e
+3
View File
@@ -432,6 +432,9 @@ async def is_channel_enabled(ctx: commands.Context) -> Literal[True]:
if channel.enabled: if channel.enabled:
return True return True
if channel.enabled is False:
raise exceptions.ChannelDisabledError()
if await models.Channel.filter(server_id=server_id, enabled=True).exists(): if await models.Channel.filter(server_id=server_id, enabled=True).exists():
raise exceptions.ChannelDisabledError() raise exceptions.ChannelDisabledError()