#"Lock" feature

10 messages · Page 1 of 1 (latest)

covert nest
#

Hi. I need help with my own "Lock" feature. Here's how it work:

  • When user use /lock, get and save all of user's current roles into a map or array or something like that
  • Next, remove all of user's roles
  • If user use /unlock, give the user's back all of the roles saved

I can:

  • Set up the commands, not the functions

I'm using the lastest version of discord.js, npm and node version.

nimble scrollBOT
#
  • 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 staff
vague girder
#

What functions? Commands effectively are functions too

covert nest
#

like getting the roles into an array

#

like i dont know a better way other than for loop the user

fathom mapleBOT
vague girder
#

That’s already a collection (which extends Map), so there you go

covert nest
#

Oh thank you

#

Let me code and see if there is any issue