Get Original message or interaction by id

Hello I want to get the originalMeesage or interaction by id, What can i do it?
4 Replies
d.js toolkit
d.js toolkit15mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
MrRober
MrRoberOP15mo ago
// Retrieve the welcome embed.
const WelcomeEmbed = await welcomeEmbed();

// Retrieve the service embed using user and Game information.
const ServiceEmbed = await rkServiceEmbed(user, Game);

// Retrieve the service menu selection using the game's ID.
const ServiceMenuSelect = await rkServiceMenuSelect(Game.id);

// Get the original interaction from the order.
const originalInteraction = order.interaction_id;

// Edit the original interaction to update its embeds and components.
await originalInteraction.edit({
embeds: [WelcomeEmbed, ServiceEmbed],
components: [ServiceMenuSelect],
});
// Retrieve the welcome embed.
const WelcomeEmbed = await welcomeEmbed();

// Retrieve the service embed using user and Game information.
const ServiceEmbed = await rkServiceEmbed(user, Game);

// Retrieve the service menu selection using the game's ID.
const ServiceMenuSelect = await rkServiceMenuSelect(Game.id);

// Get the original interaction from the order.
const originalInteraction = order.interaction_id;

// Edit the original interaction to update its embeds and components.
await originalInteraction.edit({
embeds: [WelcomeEmbed, ServiceEmbed],
components: [ServiceMenuSelect],
});
i want to get the original interaction to edit it i will use a function to get it but i don't know if is possible with discord.js
d.js docs
d.js docs15mo ago
method MessageManager#edit() Edits a message, even if it's not cached.
MrRober
MrRoberOP15mo ago
ok, I check it ty it works
const originalInteraction = await channel.messages.fetch(order.interaction_id);
const originalInteraction = await channel.messages.fetch(order.interaction_id);
ty
Want results from more Discord servers?
Add your server