Linux
1. Download the .rar
file
.rar
fileProvide a link to download the .rar
file containing everything needed for the Discord bot.
Extract the contents of the .rar
file into a folder on your Linux system. You can use the following command to extract it:
unrar x botlicense.rar
If unrar
is not installed, you can install it with:
sudo apt install unrar
2. Modify the .env
configuration file
.env
configuration fileInside the extracted folder, you will find a file called .env
.
nano .env
Input the required details such as your bot token, client ID, etc.
Example configuration:
TOKEN=
LICENSE_ID=your_license_id_here
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=root
DB_PASSWORD=
DB_NAME=license_db
LOG_CREATION_LICENSE=11111111111111111111
LOG_EDIT_LICENSE=11111111111111111111
LOG_DELETE_LICENSE=11111111111111111111
LOG_ERROR_SCRIPT=11111111111111111111
LOG_SCRIPT=11111111111111111111
ADMINS=11111111111111111111,222222222222222222
For the license_id, you need to request the license in the Discord server.
3. Import the database from query.sql
query.sql
Use a MySQL-compatible tool like mysql
or phpMyAdmin
to create and import the database.
You can create a new database and import query.sql
using these commands:
mysql -u username -p
CREATE DATABASE license_db;
USE license_db;
SOURCE /path/to/query.sql;
4. Install dependencies from requirements.txt
requirements.txt
Open the terminal in the folder where you extracted the files.
Run the following command to install all necessary libraries:
npm install
This will install all the libraries listed in the requirements.txt
file.
5. Run the bot
Once the libraries are installed, you can start the bot with the following command:
node main.js
Last updated