Trying to create a game lobby of sorts
Hi,
I'm trying to create a simple game with a discord bot and I want to have it create a sort of "game lobby" when the start game command is run. I have gotten to the point where when I call the start command I create an embed which shows a list of joined players, and then there are two buttons, one to join the game and one to start the game. When join is clicked, it updates the embed and stores the joined player in a set.
My difficulty is when I want to send a message to all the joined players when anyone clicks the start button. I want to send an ephemeral message to each player but I am not sure how to do this. I also want to pass the set of joined players onto the slash command handler to continue the game logic.
Thanks!
4 Replies
- 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!node v16.14.0, discord.js v14.12.1
you cannot send an ephemeral message to someone without an interaction
But there is an interaction right? because the players would all have hit join so is it possible to somehow send a follow up?
Is it possible to follow up an earlier interaction when another unrelated interaction happens?