Eccleria / ewibot

Discord bot for La Quête d'Ewilan server.
3 stars 0 forks source link
bot discord-bot nodejs yarn

Ewibot

Version badge Version badge

Ewibot is a Discord Bot used only on the official La Quête d'Ewilan Discord Server. This bot aim to enhance the social interactions between users. It also has the timeout command, its only moderation tool that can only be used by moderation members. No auto-moderation is planned.

Documentation

Ewibot is written in Javascript. The tree is devided into 4 main parts:

Pics

The pics folder contains all the pictures required or generated by Ewibot for some features.

Note: the generated content is not uploaded on github.

To see how it works, see the respective doc:

Database

The database folder contains the database files required. The DB system is a .json file.
db.json file is the database file used by the bot. All the database values are stored inside of it. Note: this folder is not uploaded on github, for privacy concerns.
db.json.example is a template file. This allows to share a template between developers without sharing all users' information online.

Source Code

The src folder is the folder containing all the source code for Ewibot.

Source means that its javascript (.js) files.

It is divided into 4 parts: admin, commands, helpers and the main code.

Admin

The admin folder regroups the file aiming to have an administrative action in the Discord Server. See Admin documentation for more details.

Commands

There are different commands available for the users. All are inside the files of the commands folder. See Commands documentation for more details.

Helpers

The folder is dedicated to regroup every file having smaller functions or methods used in more important files. See Helpers documentation for more details.

Main Code

Main code refers to all the files in the src folder. It includes 5 files:

Static Code

The static folder is including the json files used.

commons.json contains all the IDs used in the main file, like guild, channels or emoji IDs. It allows the distinction between 2 modes:

The personalities folder includes all the texts send by the bot in Discord channels. The texts are written according to different personalities but for now only one is used.

How to contribute

We welcome every contribution. If you want to contribute to Ewibot, you will have to follow the next instructions.

Setup process

You need to install nodejs v16.14.2. Then on your code editor you can clone the Ewibot repository, using this command on your terminal: git clone https://github.com/Eccleria/ewibot.git. You will need to install yarn with the follow command: npm install --global yarn.

Next, you need to download every dependancy that the bot need. To do so, you need to go in the ewibot folder and use the command in the terminal: yarn.

This command installs all the libraries required, such as discord.js.

Now, you need to setup the .env file. Create it with touch .envand use the .env.example as a template (you can copy the .env.example content and paste it in .env file). The DEBUG line needs to be set as yes if you have only a bot used for development (used on a Discord test server), and no if you will host Ewibot on the Ewilan Discord Server. The USE_SPOTIFY uses the same process: yes or no. If no, you don't need to write the rest of the SPOTIFY_ variables.

For the database, you need to create the .db.json file in the database folder. When created, you can repeate the same process for .env file: copy the content of the .db.json.example and paste it in the newly created file. Remove the comments, otherwise you will get an error.

2 folders need to be created:

Note: if you use an IDE that create local setup files, you shall add it to the .gitignore file. It is the case with Visual Studio 2019 that create the .vs folder locally, or .vscode for Visual Studio Code.

Contribution

To contribute, you can do so by different ways. You can contribute on existing branches or by creating a new branch.

For an existing branch, please ask to contributors if there are commits under way before adding yours.

For a new branch, you will need to create a Pull Request(PR) in order to have this branch merged into master. The PR cannot be merged without the approval of at least one other contributor. If the branch is still under development, you can set the PR as a draft. When it is ready, undraft it and request an approval.