-
Notifications
You must be signed in to change notification settings - Fork 2
Linux Installation
Before proceeding with the installation, make sure you have the following requirements:
- Python 3.10 or higher installed
-
Install git here
-
Clone the repository with
git clone http://github.com/Berry-13/LibreChat-DiscordBot.git
-
Go to the Discord Developer Portal, create an application and name it. (You can use the included
bot_icon.png
for the bot icon if you want) -
Select the
Bot
tab. Reset the token and copy it to a safe place.
- Select the OAuth2 tab. Copy the Client_ID to a safe place
-
Rename
bot_config.py.example
tobot_config.py
-
In
bot_config.py
, replace the following variables with the obtained values:TOKEN = 'your-discord-bot-token' CLIENT_ID = 'your-discord-bot-client-ID'
-
Save the file by pressing
Ctrl+X
, thenY
, and finallyEnter
. -
Install all dependencies with
pip install -r requirements.txt
in the command prompt. -
Run the bot by executing
python3 bot.py
in the terminal. -
An invite link will be generated and displayed in the console, you can use it to invite the bot to your private discord server
-
Install PM2 with
npm install pm2 -g
-
Start bot.py using
pm2 start bot.py --interpreter python
At this point, PM2 will handle your bot.py script. PM2's feature includes automatic restart on crashes, which will keep your Python bot running a lot easier.
- Note: For Python3, you may need to specify python3 instead of python in the command.
⚠️ Warning: When using this bot, exercise caution with command permissions. It is strongly recommended to limit bot command permissions to yourself or trusted individuals. We advise using the bot on a private discord server to minimize risks. This precaution is crucial as certain commands allow manipulating the .env file, and have the potential to expose sensitive API keys.