is accessing the message object from interaction response possible?

client.on("interactionCreate", async int => {
if (int.isCommand()) {
const SentResponse = await int.reply(...);
try {
const Input = await SentResponse.awaitMessageComponent(...);
} catch (error) {
const components = SentResponse.message.components;
await SentResponse.update(...);
}
}
});
client.on("interactionCreate", async int => {
if (int.isCommand()) {
const SentResponse = await int.reply(...);
try {
const Input = await SentResponse.awaitMessageComponent(...);
} catch (error) {
const components = SentResponse.message.components;
await SentResponse.update(...);
}
}
});
apparently "message" doesn't exist on SentResponse. So how do I get the message object of the reply or is it not possible?
3 Replies
d.js toolkit
d.js toolkit4mo 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 staff
chewie 🌈
chewie 🌈4mo ago
add fetchReply: true in the reply options, then it returns a message object
potsu
potsu4mo ago
aight thanks @chewie 🌈 "editedAt" doesn't exist on the fetched reply message? oh wait nvm im dumb sorry for the ping