discord_deploy

2.0.1 • Public • Published

First of all, thank you guys for installing !

A CLI to deploy slash guild commands easily.

TypeScript Support is Experimental.

Before Start

  • "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',
    ...
 };

Why ?

Simple:

With one command, you are done to deploy slash commands easily. Supports TypeScript Command Files with the power of esbuild

Tiny:

Just 3.49KB.

Supports CommonJS and ESM files.

Faster:

Uses streams and dynamic imports to support large files on demand.

Install

 npm install discord_deploy@latest

Usage

  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.

Package Sidebar

Install

npm i discord_deploy

Weekly Downloads

2

Version

2.0.1

License

MIT

Unpacked Size

8.14 kB

Total Files

4

Last publish

Collaborators

  • felipee-monteiro