ez-discordslash.js
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

ez-discordslash.js

  • Easy To Use

How To Use

  • Create A Dir (i created a Dir/Folder and Named It commands)
  • Now Copy This Code
const { Client, Intents } = require("discord.js")

const client = new Client({ intents: [Intents.FLAGS.GUILDS] })

const { SlashCommands } = require("discord-slash.js")

const commands = new SlashCommands({
  client: client,
  dir: "commands"
})
  • Now Go To Commands Dir and Create A Folder Which Will Be Our Command File
  • Example Command
    module.exports = {
      name: "ping",
      description: "ping Command",
      run: async(i, client) =>{
      
      i.reply({content: "Pong"})
      
      }
      }
  • Use .register Function To Register The Command
 commands.register()
  • Then Use .handle Function To Handle The Commands
commands.handle()
  • Or If You Want Addtional Parms to be added to Commands
commands.handle(parms1, parms2)
  • To Delete All Commands Use .deleteAll Function
commands.deleteAll()
  • To Delete A Particular Command Use .delete Function
commands.delete(name)
  • Add A Single Command use .registerSingleCommand Function
commands.registerSingleCommand({name: "some-name", description: "Some Description"})

Credits

  • Developed By Agent Hacker
  • Discord : Agent Hacker#0477

Package Sidebar

Install

npm i ez-discordslash.js

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

4.11 kB

Total Files

4

Last publish

Collaborators

  • jenil-dev