A CLI to deploy slash guild commands easily.
- "BOT_TOKEN", "GUILD_ID" and "CLIENT_ID" env variables are required;
- "commands" directory must exists anywhere in your project.
- GUILD_TEST_ID should exists in test mode, otherwise GUILD_ID will be used.
If you are using Discord.js, each command must export an object with have 'data' property, witch contains the instance of command builder. in case of eris.js, you can pass an object containing some properties. see the examples below:
Example (Discord.js):
// commands/example01.js
module.exports = {
data: new SlashCommmandBuilder(),
...
};
// commands/example01.mjs
export default {
data: new SlashCommmandBuilder(),
...
};
Eris.js:
// commands/example01.js
module.exports = {
name: 'command-name', // required field,
description: 'command-description' // required field,
...
};
// commands/example01.mjs
export default {
name: 'command-name',
description: 'command-description',
...
};
With one command, you are done to deploy slash commands easily. Supports TypeScript Command Files with the power of esbuild
Just 3.49KB.
Uses streams and dynamic imports to support large files on demand.
npm install discord_deploy@latest
Usage:
$ discord_deploy <command> [options]
Commands:
deploy
clear clear esbuild cache.
For more info, run any command with the `--help` flag:
$ discord_deploy deploy --help
$ discord_deploy clear --help
Options:
-h, --help Display this message
-v, --version Display version number