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
discord_deploy deploy [options]
Options:
-d, --debug run in debug mode. (default: false)
--cwd <dir> Absolute directory to search for. (default: process.cwd())
--test Enables test mode (Requires GUILD_TEST_ID env key). (default: false)
-h, --help display CLI Help.