From e24e7fcb6d0786963c54971924eb121d2e39cbe4 Mon Sep 17 00:00:00 2001 From: Rafael Bradley Date: Sun, 16 Mar 2025 11:19:58 -0300 Subject: [PATCH] fix(shard): :bug: Error being raised when message is sent in DMs. --- payphone/cogs/calls/cog.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/payphone/cogs/calls/cog.py b/payphone/cogs/calls/cog.py index 4b44eab..e445afe 100644 --- a/payphone/cogs/calls/cog.py +++ b/payphone/cogs/calls/cog.py @@ -198,6 +198,9 @@ class Calls(base.Cog): Handle messages in calls. """ + if not isinstance(message.channel, (discord.channel.TextChannel)): + return + ctx = await self.bot.get_context(message) if message.author.bot or ctx.valid: