Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions techsupport_bot/core/cogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ async def on_message(self: Self, message: discord.Message) -> None:
if not self.extension_enabled(config):
return

if (
message.reference
and message.reference.type == discord.MessageReferenceType.forward
):
message.content = message.message_snapshots[0].content

result = await self.match(config, ctx, message.content)
if not result:
return
Expand All @@ -135,11 +141,11 @@ async def on_message(self: Self, message: discord.Message) -> None:
context=LogContext(guild=ctx.guild, channel=ctx.channel),
)
config = self.bot.guild_configs[str(ctx.guild.id)]
channel = config.get("logging_channel")
bot_logging_channel = config.get("logging_channel")
await self.bot.logger.send_log(
message=f"Match cog error: {self.__class__.__name__} {exception}!",
level=LogLevel.ERROR,
channel=channel,
channel=bot_logging_channel,
context=LogContext(guild=ctx.guild, channel=ctx.channel),
exception=exception,
)
Expand Down
Loading