From 4375dd9deb549d70336a857d9038e2a4cc067599 Mon Sep 17 00:00:00 2001 From: Interitio Date: Thu, 18 Sep 2025 13:18:54 +1000 Subject: [PATCH] fix: Better input handling for linker channelid arg --- voicefix/cog.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/voicefix/cog.py b/voicefix/cog.py index 94c1538..44390a6 100644 --- a/voicefix/cog.py +++ b/voicefix/cog.py @@ -277,8 +277,11 @@ class VoiceFixCog(LionCog): maybe_channels = [ channel1, channel2, channel3, channel4, channel5, ] - if channelid and channelid.isdigit(): - channel = self.bot.get_channel(int(channelid)) + if channelid: + if not channelid.isdigit(): + return await ctx.error_reply("Channel id provided must be an integer!") + if not (channel := self.bot.get_channel(int(channelid))): + return await ctx.error_reply("Could not find a channel with the provided id!") maybe_channels.append(channel) channels = [channel for channel in maybe_channels if channel]