Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

CyberEmpire/discord-bot-archive

Repository files navigation

CyberEmpire Bot

This is the official repository for The Cyber Empire's Discord bot. It is built with TypeScript using the Sapphire framework on top of the discord.js library. We use the Sequelize ORM as database interface and MariaDB as primary database system.

👨‍💻 Start developing now

1. Clone the repo

git clone https://github.com/CyberEmpire/discord-bot.git

2. Install the dependencies

cd discord-bot && npm i

3. Configure the environment variables in the .env file

Copying the template file.

cp .env_example .env

See details below on how to fill in variables.

4. Build and test

npm test

🔩 Setting-up environment variables (.env file)

In this section we'll discuss how to fill properly the .env file, detailing the use of each variables.

Note: This section assumes you already have a connection-ready database system and Discord Bot.

First open the file with the editor of your choice, the file should look like this:

DB_HOST="127.0.0.1"
DB_DATABASE="database_name"
DB_USER="user"
DB_PASS="secret"

BOT_TOKEN="Discord bot Token"
BOT_PREFIX="!"

GUILD_ID="Server ID"

Now you need to replace the placeholders with actual credentials/values. The DB_* variables are related to the database connection. You need to fill-in proper connection details (Make sure that the user has all privileges on the database). Next are the BOT_* variables, these variables are relative to the Discord Bot client. Only the BOT_TOKEN variable is required, the others are optionnal. Finally the GUILD_* variables corresponds to the Discord server you will bind the bot to. This is because the bot is not aimed to be a public bot but to be used on a single server.

🔧 Development tools

To help you in coding efficiently we recommend using Visual Studio Code with the following extensions:

📌 TO-DO

  • THE REST OF THIS FILE
  • Reproduce 1:1 the original bot