From 9d81bef527d9e3cf4a8b8178262071b1c40e0f6b Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 5 Sep 2021 23:28:54 -0300 Subject: [PATCH] channels: handle when chan_type is None --- litecord/blueprints/channels.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litecord/blueprints/channels.py b/litecord/blueprints/channels.py index ae61820..aa38898 100644 --- a/litecord/blueprints/channels.py +++ b/litecord/blueprints/channels.py @@ -194,6 +194,9 @@ async def close_channel(channel_id): user_id = await token_check() chan_type = await app.storage.get_chan_type(channel_id) + if chan_type is None: + raise ChannelNotFound("Channel not found") + ctype = ChannelType(chan_type) if ctype in GUILD_CHANS: