Is it possible to check if component timed out AFTER it has timed out?

For example, when a message is sent with a select-menu component:
try {
const select = await initialReply.awaitMessageComponent({ filter: i => i.user.id === interaction.user.id, time: 15_000 });
} catch (error) {
console.log(`[setup.js]`, error);
// Instead of making a chat message appear stating the command timed out automatically, send the message if the user continues to try using the component within the message (if it exists)
}
try {
const select = await initialReply.awaitMessageComponent({ filter: i => i.user.id === interaction.user.id, time: 15_000 });
} catch (error) {
console.log(`[setup.js]`, error);
// Instead of making a chat message appear stating the command timed out automatically, send the message if the user continues to try using the component within the message (if it exists)
}
4 Replies
d.js toolkit
d.js toolkit7mo 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
Swyftey
SwyfteyOP7mo ago
I see, smart. I'll try, thanks. Thanks, lol I just need to know how to actually set the custom id of an already-made component I see.. That makes sense, thanks Sorry, I'm still a bit confused, because I am not seeing a parameter to change the customId through "edit". Sending example
Swyftey
SwyfteyOP7mo ago
No description
Swyftey
SwyfteyOP7mo ago
and
// This is the first reply sent after the command is ran

const initialReply = await interaction.reply({
content: `What feature would you like to set up?`,
ephemeral: true,
components: [selectMenu.stringSelect(interaction, {minValue: 1, maxValue: 1, placeholder: `* Select a feature`}, featureOptions)]
});
// This is the first reply sent after the command is ran

const initialReply = await interaction.reply({
content: `What feature would you like to set up?`,
ephemeral: true,
components: [selectMenu.stringSelect(interaction, {minValue: 1, maxValue: 1, placeholder: `* Select a feature`}, featureOptions)]
});
I only want the response to be "timed out" if the awaitMessageComponent times out Oh, i'm supposed to just create a whole 'nother select menu component DUH just with the new id got it now
Want results from more Discord servers?
Add your server