/HSE-Manager-Bot

A Discord Bot which is Made for running on the HSE Manager Discord Server

Primary LanguageJavaScriptMIT LicenseMIT

HSE-Manager-Bot

This bot is made to run on the HSE Manager server.

Discord Status DeepScan grade CodeFactor Codacy Badge Deploy FOSSA Status Gitmoji ko-fi

How to run it ?

  1. To run the bot, you need to clone it. Just type:
$ git clone https://github.com/hypesquad-event-manager/hse-manager-bot
  1. Then, you'll need to install dependencies. To do that just type:
$ npm i
or
$ npm install
  1. Once you installed them, you'll just need to create some files to hold the app credentials. First, you'll need to create a folder at the project root named private - it will be automaticaly ignored by git - , once you did that, create a file named tokens.js and write the following in it:
module.exports = {
    CLIENTS: {
        HSE_BOT: "Put the bot token here"
    },
    TWITTER: {
        CONSUMER_KEY: "",
        CONSUMER_SECRET: "",
        ACCESS_TOKEN: "",
        ACCESS_TOKEN_SECRET: ""
        // Fill those with your Twitter API Credentials (If you don't need The functionality, leave those empty.)
    }
}
  1. Then you can run the app with the following command:
$ npm start

How to contribute ?

To contribute, you can commit your changes to the repository. You can contribute to commands or events triggered by the bot:

Commands

  1. Add a file named command_name.js in the app/commands folder, then follow this syntax into the file:
// Example import if you need the bot object
const { bot } = require("../app"); 

// Change command for the name of the command, exemple: help, ban, ...
class command {
    constructor() {
        /* Need to be a valid permission from discord.js, 
        it is the permission needed for the user to execute the command.
        Do not define in the constructor if you don't want to set a restriction*/
        this.permission = "MANAGE_MESSAGES" 
        }
        execute(message, args) {
            // Your command execution here
        }
}

// This is mandatory, the exported object must be the command class
module.exports.commands = { command }
  1. Upload it to Github

Fork This Repository, upload your changed files and open a Pull Request targeted at the develop branch.

If We Like what you did and think it's a good adition, we will merge your PR.

Events

To register one or more events, create a file inside the app/events folder and then name it event_name.js then, you can code inside, exemple:

// Import the bot object
const { bot } = require("../app");

// Register an event
bot.on("guildMemberAdd", member => {
    // Your code here
})

Contributors

License

FOSSA Status