diff --git a/payphone/cogs/calls/cog.py b/payphone/cogs/calls/cog.py index e445afe..0ad87f8 100644 --- a/payphone/cogs/calls/cog.py +++ b/payphone/cogs/calls/cog.py @@ -7,6 +7,8 @@ from discord.ext import commands import aiohttp +import sentry_sdk + from payphone.db import models from payphone.bot import Payphone from payphone.cogs import base @@ -157,7 +159,7 @@ class Calls(base.Cog): if user.is_masked: 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." @@ -415,11 +417,20 @@ class Calls(base.Cog): break - except discord.errors.DiscordException: + except discord.errors.NotFound: await self.bot.call_handler.refresh_channel_webhook_url( other_channel ) + except discord.errors.Forbidden: + await self.bot.get_partial_messageable(other_channel).send( + "❌ **Payphone** is missing `Manage Webhooks` permissions. You won't see any messages while that permission is not set." + ) + break + + except discord.errors.DiscordException as exc: + sentry_sdk.capture_exception(exc) + @commands.Cog.listener() async def on_raw_message_delete( self, payload: discord.RawMessageDeleteEvent