#How to make an alias command name?

12 messages · Page 1 of 1 (latest)

amber turret
#

I want to make a ban command, and I want the command to support "technique" and "ban", however this setup only allows "ban" to work.

Yes, I know djs 12.x (I have 12.5.3) isn't supported anymore, but I really don't wanna use slash commands so..., also this code should still work in more recent versions anyway

pliant bolt
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

jovial prairie
#

Your issue is just looking to see if a string (Message#content) includes any string from an array (<YourFile>.help.name). That is not DJS related. Also, you should still work on updating since the API version that v12 uses will soon be decommissioned entirely.

amber turret
#

are slash commands mandatory in later versions

#

that and/or will i have to adjust some of my code

lethal wren
#

Slash commands won’t be mandatory but keep in mind you need the message content intent and slash commands have generally better ux

amber turret
#

so upon updating to djs 14.6 "ALL" is undefined, when it wasn't previously

iron onyxBOT
#

Version 14 has released! Please update at your earliest convenience.
• Update: npm rm discord.js npm i discord.js
Update guide (use CTRL + F to search for the old method or property)

#

We highly recommend only specifying the intents you actually need.
• Note, that 98303, 32767 or whatever other magic number you read that represents "all intents", gets outdated as soon as new intents are introduced.
• The number will always represent the same set of intents, and will not include new ones. There is no magic "all intents" bit.

amber turret
#

so i don't wanna flood my entire code with a bunch of separate intents, is there some way to get around that?

jovial prairie
#

You can define your intents in a separate file and import that file if you just care about the readability of your index

#

Also, the intents property is top-level in your ClientOptions instead of being a property of ws