1.0.13 • Published 2 years ago

extended-client v1.0.13

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Extended Client

A Client who extend the base of discord.js, offer an integrated builder of SlashCommands with @discordjs/builders and handlers.

Installation

Node.js 16.9.0 is required (same version as discord.js)

npm install extended-client

Example Usage (ESM syntax)

Setup the client.

const extendedClient = new ExtendedClient({
    intents: myIntents,
    slashCommandHandler: true,
    eventHandler: true
})

Load the handlers.

extendedCLient.eventHandler.load("myDirectory")

extendedClient.slashCommands.load("myDirectory")
/**
 * Warning !!
 * acutally slashCommands handler must be in the format:
 * 
 * index.js
 * commandHandler/
 *  |-> commandCategory/
 *      |-> command.js
 * 
 * and event handler must be in the following format:
 * 
 * index.js
 * eventHandler/
 *  |-> event.js
 **/

Do a command file

// commandHandler/utilities/ping.js

export const data = new SlashCommandBuilder() .setName('ping') .setDescription("Send the bot ping")

export const execute = async (client, interaction) { //your code }

> Do an event file
```js
// eventHandler/ready.js

export const name = "ready"
export const once = true

export function execute(client){
    //your code
}

Use the integrated Builder

import { Builder } from "extended-client"

const builder = new Builder(extendedClient)

builder.globalBuild(extendedClient.slashCommands)

// actually, the builder only support global push

Help

if you need help for something don't hesitate to join this discord server and ping Bastien#1414

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago