Skip to content

Client ​

The JellyCommands client is the core of every project. It extends the discord.js client to add additional functionality.

Get Started ​

The basic setup is shown below. The intents field is required by the discord.js client.

js
import { JellyCommands } from 'jellycommands';

const client = new JellyCommands({
    clientOptions: {
        // Intents is required
        intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES],
    },
});

client.login();

Options ​

commands ​

Passing a string will automatically load commands from that directory, otherwise you can manually import your commands and pass them in as an array. Files prefixed with _ are ignored.

events ​

Passing a string will automatically load events from that directory. Otherwise, you can manually import your events and pass them in as an array. Files prefixed with _ are ignored.

buttons ​

Passing a string will automatically load buttons from that directory. Otherwise, you can manually import your events and pass them in as an array. Files prefixed with _ are ignored.

clientOptions ​

This is passed directly to the discord.js client

props ​

The built-in way to pass data through a JellyCommands app

messages ​

Customise JellyCommands responses

messages.unknownCommand ​

  • Type: string | MessagePayload | InteractionReplyOptions

The default message sent when an unknown command interaction is recieved

dev ​

DX focused developer mode

dev.global ​

  • Type: boolean

Whether dev mode should be enabled globally

dev.guilds ​

  • Type: string[]

The guilds to register dev mode commands in

cache ​

  • Type: boolean
  • Default: true

Enables JellyCommands cache. It's recommended to keep this on

debug ​

  • Type: boolean

Enables debug messages to be printed to console. If a non-empty DEBUG environment variable is set then this will automatically be enabled.

MIT Licensed