handler.djs
TypeScript icon, indicating that this package has built-in type declarations

2.6.36 • Public • Published

v

Introduction

handler.djs is a powerful tool designed to simplify the management of Discord.js bot files. It aims to enhance productivity by reducing the amount of time and code required to handle various aspects of a Discord bot, while also improving performance.

Installing

 $ npm init
 $ npm i discord.js@v14.9.0
 $ npm i handler.djs
You can Handel Files with this package

SetUp

const { Client, GatewayIntentBits } = require('discord.js');
const { Application } = require('handler.djs');
const path = require('node:path');

const client = new Client({ intents: [
    GatewayIntentBits.Guilds, 
    GatewayIntentBits.MessageContent, 
    GatewayIntentBits.GuildMessages
    ] 
});

new Application(client, {
  commandsPath: path.join(__dirname, 'commands'),
});

client.Application.setPrefix("!");

client.Application.build();

client.login(yourToken);

commands Setup

const { CommandBuilder } = require('handler.djs');

module.exports = new CommandBuilder() 
.setName("ping")
.setMessageExecution(Execute)

async function Execute(message) {
  message.reply({ content: "PONG 🏓" });
}

Package Sidebar

Install

npm i handler.djs

Weekly Downloads

53

Version

2.6.36

License

MIT

Unpacked Size

89.9 kB

Total Files

52

Last publish

Collaborators

  • polyer