#What are some ways to make your code more neat and organized?

5 messages · Page 1 of 1 (latest)

outer quarry
#

For example, slash commands. Is there a way to neatly organize what I've got going on here? Especially the .awaitMessageComponent, I have at least two of them here and it feels like there is a potential better way of using them for cleaner code.

balmy aspenBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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
frosty sand
#

You should make your second awaitMessageComponent on the message too, not the channel. Especially since you don’t filter in it at all

#

Else it might collect another interaction than the one you wait for there

outer quarry
#

Alright