1.0.6 • Published 1 year ago

djsext v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Discord.js - Extension

An extension for discord.js library that adds some specific events over discord.js defaults

To begin with, you can install library using npm like that:

npm install djsext

Import library like that:

const { ImprovedDiscordLibrary } = require("djsext")

Create the client instance following discord.js documentation

const client = /*get reference from discord.js docs*/

and extend client possibilities with one line

ImprovedDiscordLibrary(client)

Simpler than simple and you get the following events:

  • ButtonInteractionCreate emitted when you press button
  • CommandInteraction emitted when you use slash command
  • SelectMenuInteraction emitted when you interact with select menu
  • ModalSubmitInteraction emitted when you submit modal

You could use them like string values in the client.on method like that:

client.on("ButtonInteractionCreate", /*your callback function*/)

but its highly recommended to use ExEvents object that is exported from library:

const { ExEvents } = require("djsext")

/* ... */

client.on(ExEvents.ButtonInteractionCreate, /*your callback function*/)
1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago