Skip to content

Commit

Permalink
fix(msgInfo): fix problem with reporting compact messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Jan 25, 2024
1 parent bba519b commit 978ded0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/context-menu/messageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export default class MessageInfo extends BaseCommand {
const reason = interaction.fields.getTextInputValue('reason');
const message = await interaction.channel?.messages.fetch(messageId).catch(() => null);
const content = message?.content || message?.embeds[0].description || undefined;
const attachmentUrl = content?.match(REGEX.IMAGE_URL)?.at(0) ?? message?.embeds[0].image?.url;
const attachmentUrl = content?.match(REGEX.IMAGE_URL)?.at(0) ?? message?.embeds[0]?.image?.url;

await interaction.client.reportLogger.log(messageInDb.originalMsg.hub.id, {
userId: authorId,
Expand Down

0 comments on commit 978ded0

Please sign in to comment.