1.8.7 • Published 3 years ago
slash_commands.js v1.8.7
slash_commands.js
slash_commands.js is a free easy to use slash command package for discords.js
If you find any bugs, contact me
Installation
Use the package manager npm to install slash_commands.js.
npm i slash_commands.js
Create Example
const slash = require("slash_commands.js") //define the package
//create a slash command option
const helpcommandOption = new slash.slashOption()
.setName("name")
.setDescription("Enter your name")
.setType("string")
.setRequired(false)
//create a command
const helpCommand = new slash.slashCommand(client /*your discord client*/)
.setName("help")
.setDescription("The help command.")
.addOption(helpcommandOption) //add the option declared on the top
Respond Example
slash.onExecute(client, (message)=>{
if(message.content == "help"){ // test if the command executed is the help command
message.reply({content:"Hi", ephemeral:false}).then(msg=>{ //send a response (if you write true instead of false only you can see the message)
setTimeout(()=>{
msg.edit({content:"bye!"}) //edit the message
},5000)
})
}
})
Documentation
https://theminecrafter05.github.io/slash_commands.js/index.html
WARNING
Discord takes a lot of time to create or update a slash command. So be patient if you add one.
Also you need to invite your bot with the application.commands permission:
https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=0scope=applications.commands%20bot
License
1.8.7
3 years ago
1.8.5
3 years ago
1.8.1
3 years ago
1.8.0
3 years ago
1.7.8
3 years ago
1.7.7
3 years ago
1.7.6
3 years ago
1.7.5
3 years ago
1.7.0
3 years ago
1.6.8
3 years ago
1.6.5
3 years ago
1.6.2
3 years ago
1.6.0
3 years ago
1.5.5
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.5
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.3
3 years ago
1.3.2
3 years ago
1.3.1
3 years ago
1.3.0
3 years ago
1.2.6
3 years ago
1.2.5
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.5
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago