Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bracketbyte/djs-handler
Simple and easy to use Discord.js command and event handler, use this template for your next bot!
https://github.com/bracketbyte/djs-handler
bot command-handler discord-bot discord-command discord-js djs event-handler
Last synced: about 1 month ago
JSON representation
Simple and easy to use Discord.js command and event handler, use this template for your next bot!
- Host: GitHub
- URL: https://github.com/bracketbyte/djs-handler
- Owner: BracketByte
- Created: 2021-01-28T17:37:23.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-27T20:00:52.000Z (almost 3 years ago)
- Last Synced: 2024-09-28T09:03:15.126Z (about 2 months ago)
- Topics: bot, command-handler, discord-bot, discord-command, discord-js, djs, event-handler
- Language: JavaScript
- Homepage:
- Size: 41 KB
- Stars: 21
- Watchers: 3
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Command and Event Handler For Discord.js!
Simple and easy to use command and event handler
with useful features.## INFO
**!** The command handler used in this repository is based on the official discord.js command handler
**!** Make sure that you have Node.js and NPM installed and up to to date on your system
## HOW DO I SETUP MY BOT?
**!** If you'r hosting the bot on your loca machine create a new file in the root of the directory of the project called `.env` and write in it `TOKEN=your_token_goes_here` if not, add the token to your bot environtment variables with the name of `TOKEN`
**!** Set your prefix in `utils/config.json`
**!** Run `npm install` in your terminal
## HOW DO I START THE BOT?
**!** If it's not your first time running this bot, run `npm run start` in your terminal
**!** Use `npm run LocalStart` in your terminal if you'r running the bot on a local machine to make use of the .env file
## HOW TO ADD NEW COMMANDS?
**1** Create a new .js file in the commands folder with the name of your command.
**2** Populate the file with the code reprezented here:
```js
module.exports = {
name: "commanad name",
description: "description of your command",
aliases: ["aleas1", "alias2"],
usage: "[argument1] [argument2]",
guildOnly: false, //true if only used in server
args: false, //true if the command cant run without arguments
permissions: {
bot: [], //permissions that the bot requires for the command
user: [], //permissions that the user requires for the command
},
execute: async (message, args, client) => {
//code for the command goes here
},
};
```**3** start your bot and see if it works!