3.0.1 • Published 3 years ago

royal-handler.js v3.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Royal-Handler.js

npm i royal-handler.js

Why?

Royal Handler allows to make discord bots in a easier and user understable, we provide events handler and command handler in the current version.

How to use?

Royal handler is a discord bot development based package it can be used to easier the work of developers

Example :

const { Client } = require("discord.js");
const { Handler } = require('royal-handler.js');

const client = new Client(); const commands = new Handler({ commandsDir: './commands', Client: client, prefix: '!', eventsDir: './events', }) module.exports = client; // required client.login("TOKEN"); commands.build();

`module.exports = client`, is required for the events.
make a events directory and can use this template -
```JS
const client = require('../index');

client.on("ready", async function(){

    console.log("Bot is online")

})

Make a commands directory, then inside the directory make another directory on the topic of the command inside the second directory make the commandname.js file inside that write the following template -

module.exports = {
    name: 'test',

    run: async(client, message, args) => {
        message.channel.send("Hello World")
    }
}

like this you can make 100s of commands!

Contribution

© tsdon0001 2021 | Guitarhost | Github

3.0.1

3 years ago

3.0.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.0

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago