This bot is made to run on the HSE Manager server.
- To run the bot, you need to clone it. Just type:
$ git clone https://github.com/hypesquad-event-manager/hse-manager-bot
- Then, you'll need to install dependencies. To do that just type:
$ npm i
or
$ npm install
- 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 namedtokens.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.)
}
}
- Then you can run the app with the following command:
$ npm start
To contribute, you can commit your changes to the repository. You can contribute to commands or events triggered by the bot:
- Add a file named
command_name.js
in theapp/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 }
- 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.
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
})
- @FoxyWhite2541: Project Leader
- @ScarVite: Project Leader
- @IchiiDev: Bot Developer
- @Zallom: Bot Developer
- @HSE-Manager: Quality Stuff (Bot)