discord-commander-help-command
v1.1.5
Published
Help command for discord-commander
Downloads
3
Maintainers
Readme
Discord-commander-help-command
Help command for discord-commander
Install
npm install discord-commander-help-command
Import
/**
* ES6
*/
import DiscordCommanderHelpCommand from "discord-commander-help-command"
import { DiscordCommander } from "@demostanis.worlds/discord-commander"
import Discord from "discord.js"
/**
* CommonJS
*/
const DiscordCommanderHelpCommand = "@demostanis.worlds/discord-commander-help-command"
const { DiscordCommander } = require("discord-commander")
const Discord = require("discord.js")
Usage
DiscordCommanderHelpCommand(name: string, commands: DiscordCommander.Command[])
Examples
import DiscordCommanderHelpCommand from "discord-commander-help-command"
import { DiscordCommander } from "@demostanis.worlds/discord-commander"
import Discord from "discord.js"
import "dotenv/config"
const client = new Discord.Client()
client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}!`)
const commander = new DiscordCommander({
client: client,
vipRole: "604250294846750720",
vipOnlyMessage: "Sorry! This command is only available for VIPs.",
argumentRequiredMessage: "It seems that you forgot an argument which is required...",
timeoutMessage: "Please slow down...",
commands: [{
name: "*order-pizza",
description: "Orders pizza.",
timeout: 1000,
argumentList: [{
name: "type",
description: "Sets the type of the pizza you're ordering.",
required: true
}],
optionList: [{
name: "--cheese",
description: "Adds some cheese to your pizza."
}, {
name: "--mushrooms",
description: "Adds some mushrooms to your pizza.",
vipOnly: true
}],
does(message, argumentList, optionList) {
// ...
}
}]
})
commander.config.commands.push(DiscordCommanderHelpCommand("*help", commander.config.commands))
})
client.login(TOKEN)
Issues
- For any issue, please tell them here.