going back to previous embed

i have 2 embeds in MessageCreate event which checks message then only send the embed, and other embeds in Interaction create event from select menu when condition of messagCreate doesn't work(it will send select menus if messagecreate can't detect the required thing). these all embed has "Payment Complete" button which when clicked leads to another embed. In another embed, i want to keep go back button so when it's pressed it goes back to previous embed. How can i do that?
2 Replies
d.js toolkit
d.js toolkit16mo 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!
_iamelite
_iameliteOP16mo ago
note that all embeds are different, but payment complete and goback button have only 1 custom ID each, meaning same button of same cID is given hope this makes you understand what i want
if(messagecreate event){
check if the message created has word "a" or "b";
if(yes) send embed1 with 'paycomp' button;
if(no) send selectmenu{
send list of letters, "c", "d"....
}
}
if(interactioncreate event is selectmenu){
send the list of menus;
send embed2 with 'paycomp' button;
}
if(interactioncreate event is button){
if(button = paycomp){
send embedBeta with 'go back' button;
}
if(button = go back){
//it needs to go to previous embed
}
}
if(messagecreate event){
check if the message created has word "a" or "b";
if(yes) send embed1 with 'paycomp' button;
if(no) send selectmenu{
send list of letters, "c", "d"....
}
}
if(interactioncreate event is selectmenu){
send the list of menus;
send embed2 with 'paycomp' button;
}
if(interactioncreate event is button){
if(button = paycomp){
send embedBeta with 'go back' button;
}
if(button = go back){
//it needs to go to previous embed
}
}
Want results from more Discord servers?
Add your server