JSPM

gcommands

2.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q72863F
  • License MIT

Open-source slash/normal command handler

Package Exports

  • gcommands

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gcommands) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

G Commands


Installation

npm install gcommands

DEV build

npm install github:Garlic-Team/GCommands#dev

Support

How to use?
index.js

const { GCommands } = require("gcommands");
const Discord = require("discord.js");

const client = new Discord.Client();

client.on("ready", () => {
    new GCommands(client, {
        cmdDir: "commands",
        eventDir: "events", //when you want event handler
        errorMessage: "Error :(",
        ownEvents: false,
        slash: {
           slash: 'both', //true = slash only, false = only normal, both = slash and normal
           prefix: '.' 
        },
        cooldown: {
            message: "Please wait {cooldown} more second(s) before reusing the \`{cmdname}\` command.",
            default: 3
        },
        database: {
            type: "mongodb", //sqlite/mongodb
            url: "mongodb+srv://" //mongourl
        }
    })
})

client.on("gDebug", (debug) => {console.log(debug)})

client.login("token")