From a7a1183a8e55ae27206e056df270cf823d9dda9c Mon Sep 17 00:00:00 2001 From: "Nyeki.py" <84998222+Nekidev@users.noreply.github.com> Date: Sat, 19 Oct 2024 21:36:42 -0300 Subject: [PATCH] fix(bot): :bug: Disabled channels allowing commands to be ran in them. --- payphone/bot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/payphone/bot.py b/payphone/bot.py index 921dea0..c6c89d3 100644 --- a/payphone/bot.py +++ b/payphone/bot.py @@ -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()