From 9d1e24fa51a7e0af106c452365d3ca89af3002c1 Mon Sep 17 00:00:00 2001 From: Rafael Bradley Date: Wed, 19 Mar 2025 19:17:51 -0300 Subject: [PATCH] fix(shard): :bug: Ignore system messages. --- payphone/cogs/calls/cog.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/payphone/cogs/calls/cog.py b/payphone/cogs/calls/cog.py index bd80488..496dac1 100644 --- a/payphone/cogs/calls/cog.py +++ b/payphone/cogs/calls/cog.py @@ -205,7 +205,10 @@ class Calls(base.Cog): ctx = await self.bot.get_context(message) - if message.author.bot or ctx.valid: + if message.author.bot or ctx.valid or message.author.system: + return + + if message.type in [discord.MessageType.default, discord.MessageType.reply]: return if await self.bot.is_banned(message.author.id): @@ -223,7 +226,12 @@ class Calls(base.Cog): message.channel.id, ) - if participant.display_name.lower() in ["everyone", "here", "wumpus", "discord"]: + if participant.display_name.lower() in [ + "everyone", + "here", + "wumpus", + "discord", + ]: await message.reply( f"❌ You can't use {participant.display_name} as your name in calls.\n-# Restriction imposed by Discord." )