DEV Community

Deathvenom
Deathvenom

Posted on

v1.2.0 for djs-marshal is out!

It has been a long time since I worked on my discord.js command and interaction manager djs-marshal. So here we are!

v1.2.0 brings permission options like allowRoles, denyRoles, allowUsers and denyUsers, better error handling and deprecates allowWithPermission, which was a terrible idea to even begin with. Check it out!

GitHub logo DeathVenom54 / djs-marshal

A slash command handler for discord.js v13

djs-marshal

npm downloads discord

A lightweight command handler for discord.js interactions

This package requires discord.js v13 or higher to be installed

Installation

# with npm
npm install djs-marshal --save
# with yarn
yarn add djs-marshal
# this package also requires discord.js
npm install discord.js --save
Enter fullscreen mode Exit fullscreen mode

Documentation

You can find the full documentation here

Setup

You can set up your bot to handle commands in 2 ways:

initializeBot()

This is the recommended way to set up your bot. It sets up various things like commands' directory, logging and handlers for various events required.

import Marshal from 'djs-marshal';
import path from 'path';
const client = Marshal.initializeBot({
  // the path where slash commands are stored
  slashCommandsPath: path.join(__dirname, 'commands'),
  // (optional) message to log on ready event
  readyMessage: 'Logged in as {tag}',
  // (optional) bot's token, will login if provided
  token
Enter fullscreen mode Exit fullscreen mode

Top comments (0)