fix(shard): 🚑 Report message command not working.

This commit is contained in:
2025-03-15 13:39:45 -03:00
parent b520ac5d02
commit 7e4e354819
3 changed files with 13 additions and 11 deletions
+11 -9
View File
@@ -475,7 +475,17 @@ class Calls(base.Cog):
"❌ You're banned from using Payphone.", ephemeral=True "❌ You're banned from using Payphone.", ephemeral=True
) )
if not await self.bot.call_handler.get_message(message.id): if message.author.bot:
message_id = await self.bot.call_handler.get_original_message_id(message.id)
author_id = await self.bot.call_handler.get_message_author_id(message_id)
found_message = bool(author_id)
else:
message_id = message.id
author_id = message.author.id
found_message = bool(await self.bot.call_handler.get_message(message.id))
if not found_message:
return await ctx.send_response( return await ctx.send_response(
( (
"❌ More than 15 minutes have passed since this message was sent.\n" "❌ More than 15 minutes have passed since this message was sent.\n"
@@ -484,14 +494,6 @@ class Calls(base.Cog):
ephemeral=True, ephemeral=True,
) )
if message.author.bot:
message_id = await self.bot.call_handler.get_original_message_id(message.id)
author_id = await self.bot.call_handler.get_message_author_id(message_id)
else:
message_id = message.id
author_id = message.author.id
await ctx.send_response("✅ The message has been reported.", ephemeral=True) await ctx.send_response("✅ The message has been reported.", ephemeral=True)
await models.Report.update_or_create( await models.Report.update_or_create(
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "payphone" name = "payphone"
version = "0.40.0" version = "0.41.0"
description = "Add your description here" description = "Add your description here"
readme = "README.md" readme = "README.md"
requires-python = ">=3.12" requires-python = ">=3.12"
Generated
+1 -1
View File
@@ -353,7 +353,7 @@ wheels = [
[[package]] [[package]]
name = "payphone" name = "payphone"
version = "0.39.0" version = "0.41.0"
source = { virtual = "." } source = { virtual = "." }
dependencies = [ dependencies = [
{ name = "aerich" }, { name = "aerich" },