From 164be700fa3352a8c7a25dc045b9c2193f162d77 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Wed, 18 Nov 2020 16:47:49 -0800 Subject: [PATCH] [Tools] Catch a bad channel --- tools/tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/tools.py b/tools/tools.py index b29b0b5..7329f75 100644 --- a/tools/tools.py +++ b/tools/tools.py @@ -196,6 +196,10 @@ class Tools(commands.Cog): channel = ctx.channel else: channel = self.bot.get_channel(channel) + + if channel is None: + return await ctx.send("Not a valid channel.") + if channel: guild = channel.guild