Collector#end not firing off unless there's been another button pressed.

node -v output:
v21.0.0
v21.0.0
npm list output:
shirabot@1.0.0 /home/ubuntu/Projects/discordjs-shirabot
├── discord.js@14.13.0
├── dotenv@16.3.1
├── eslint@8.52.0
└── sqlite3@5.1.6
shirabot@1.0.0 /home/ubuntu/Projects/discordjs-shirabot
├── discord.js@14.13.0
├── dotenv@16.3.1
├── eslint@8.52.0
└── sqlite3@5.1.6
I am trying to make a smash or pass bot for mobile suits. I created a pagination system so you can flip through the different images of the mobile suits. The pagination buttons are seated on the left and the right of the smash or pass buttons. I am using a collector to collect the button presses for pagination and I have the smash or pass buttons (sort of) working in that same collector. I have placed the collector.stop() method inside the button presses for smash and pass so the user can endlessly paginate. However, if the user only presses smash or pass and does not paginate, then the end event is not emmitted. I have attached a couple images that will hopefully illustrate my problem, but if it does not I will be pasting the relevant parts of my code. Here is the file itself without the fat trimmed out: https://github.com/variable-formation/discordjs-shirabot/blob/pagination/src/commands/fun/smash.js
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
variable_formation
I would post the stack trace, but there isn't one. I hope I am wording this correctly, I posted it to my understanding. Also, yeah. My code is a bit sloppy right now. I'm mainly just prototyping. It would appear that I am an idiot who forgot to check the visibility settings. It should be working now.
variable_formation
GitHub
discordjs-shirabot/src/commands/fun/smash.js at pagination · variab...
This is the Discord bot I use to workshop all my other bot ideas for Discord.js. - variable-formation/discordjs-shirabot
variable_formation
Thanks for the catch.