Skip to content

Commit

Permalink
fix(msgInfo): deferring the reply
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Jan 7, 2024
1 parent ec37481 commit ac2e898
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/commands/context-menu/messageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export default class MessageInfo extends BaseCommand {
};

async execute(interaction: MessageContextMenuCommandInteraction) {
await interaction.deferReply({ ephemeral: true });

const target = interaction.targetMessage;
const originalMsg = (
await db.broadcastedMessages.findFirst({
Expand All @@ -43,7 +45,7 @@ export default class MessageInfo extends BaseCommand {
)?.originalMsg;

if (!originalMsg) {
await interaction.reply({
await interaction.followUp({
content: t({ phrase: 'errors.unknownNetworkMessage', locale: interaction.user.locale }),
ephemeral: true,
});
Expand Down Expand Up @@ -85,7 +87,7 @@ export default class MessageInfo extends BaseCommand {
);
}

await interaction.reply({
await interaction.followUp({
embeds: [embed],
components,
ephemeral: true,
Expand Down

0 comments on commit ac2e898

Please sign in to comment.