djs-better

1.0.5 • Public • Published

djs-better


Usage

const { Client } = require('discord.js');
const djs = require(`djs-better`);
const client = new Client();

// Method 1
client.utils = new djs(client);
// Method 2
const tools = new djs(client);

Functions

  • .getMention - Gets the first mention in a message object.
  • .hasPerm - Checks if a member has a permission.
  • .hasRole - Checks if a member has a role.
  • .giveRole - Gives a member a role if they do not have it already.
  • .takeRole - Takes a role from a member if they have it.
  • .registerCommand - Registers a slash command.
  • .deleteCommand - Deletes a slash command.
  • .deleteAllCommands - Deletes all slash commands.

Function Variables

  • .getMention(message)
  • .hasPerm(member, permission)
  • .hasRole(member, role)
  • .giveRole(member, role)
  • .takeRole(member, role)
  • .registerCommand(client, NAME OF COMMAND, DESCRIPTION OF COMMAND, COMMAND OPTIONS, options)
  • .deleteCommand(client, NAME OF COMMAND, guild | option)
  • .deleteAllCommands(client, guild | option)

Dependencies

Examples

To see examples go to examples.js

Contact

Read Me Made by IceyyM8

Package Sidebar

Install

npm i djs-better

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

10.3 kB

Total Files

6

Last publish

Collaborators

  • plutothedev