#Dynamic embed button responses
1 messages · Page 1 of 1 (latest)
I don't fully follow this, I'm using interaction.editReply({ embeds: [embed], components: [buttons] }) to send the embed
im mostly confused because when you click a button, it generates a completely separate interactionCreate instance
What's the initial reply
I don't have one, i call await interaction.deferReply()
ok fair enough.. you can just reply immediately but that is the safe way to go
as for button interactions
yeah, so currently my setup is basically: receive the command request, call the api im using to fetch data, reply to the user with a simple embed that says "click button a to display some stats, click button b to display other stats"
and i have the data available
i just dont know how to pass that data to the button click
because its generating a completely separate interaction
you can make an interaction collector within your slash command that fires when the button is pressed
so that data isnt immediately accessible unless im mistaken..
.
<:_:862626783890636830> discordjs.guide results:
• Popular Topics: Collectors
• Popular Topics: Message collectors
Use an InteractionCollector
i've designed this in the past but with emote collectors.. i'll look into interaction collectors instead
thanks!
