fix(bot): 🐛 Webhooks not being found.

This commit is contained in:
Nyeki.py
2024-11-01 16:32:07 -03:00
parent 00ad045a35
commit ee306a6f1f
2 changed files with 23 additions and 7 deletions
+3
View File
@@ -30,6 +30,9 @@ spec:
containers: containers:
- name: postgres - name: postgres
image: postgres:latest # Standard PostgreSQL image image: postgres:latest # Standard PostgreSQL image
args:
- -c
- max_connections=2000
env: env:
- name: POSTGRES_DB - name: POSTGRES_DB
value: "payphone" value: "payphone"
+13
View File
@@ -786,6 +786,7 @@ class Calls(base.Cog):
if replying_message is not None: if replying_message is not None:
replying_to_id = replying_message.id replying_to_id = replying_message.id
try:
webhook_message = await webhook.send( webhook_message = await webhook.send(
cleaned_content, cleaned_content,
username=call_rs.display_name, username=call_rs.display_name,
@@ -794,6 +795,18 @@ class Calls(base.Cog):
wait=True, wait=True,
) )
except errors.NotFound:
other_channel.webhook_id = None
other_channel.webhook_url = None
try:
await dbutils.get_channel(
await self.bot.get_or_fetch_channel(other_channel.id)
)
finally:
pass
pipe = self.bot.redis.pipeline() pipe = self.bot.redis.pipeline()
pipe.hset( pipe.hset(