From df8aef39e30877e539768e68a49b0b5b9f479f68 Mon Sep 17 00:00:00 2001 From: Rafael Bradley Date: Sun, 16 Mar 2025 11:17:09 -0300 Subject: [PATCH] fix(shard): :bug: Fix `p.mask` not responding when the user hasn't participated in the call yet. --- payphone/cogs/calls/cog.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/payphone/cogs/calls/cog.py b/payphone/cogs/calls/cog.py index 510c6e6..4b44eab 100644 --- a/payphone/cogs/calls/cog.py +++ b/payphone/cogs/calls/cog.py @@ -155,10 +155,14 @@ class Calls(base.Cog): participant = await call.get_participant(ctx.author.id) if user.is_masked: - message += f" You're currently being displayed as **{masks.get_mask_emoji(participant.mask)} {masks.get_mask_name(participant.mask)}**." + if participant is not None: + message += f" You're currently being displayed as **{masks.get_mask_emoji(participant.mask)} {masks.get_mask_name(participant.mask)}**." + + else: + message += " Participate in the call to see your mask." message += ( - " You can toggle your mask on or off using `p.mask on` or `p.mask off`." + " You can toggle your mask on or off using `p.mask on` and `p.mask off`." ) return await ctx.send(message)