fix(shard): 🐛 Payphone not sending messages when missing webhook permissions.

This commit is contained in:
2025-03-16 11:24:16 -03:00
parent e24e7fcb6d
commit 5c4248c749
+12 -1
View File
@@ -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
@@ -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