Skip to content
Kryštof Linhart edited this page Jan 15, 2025 · 7 revisions

Installation Guide

Follow these steps to set up and run the bot:

1. Prerequisites

Python Installation:

Ensure Python 3.8 or newer is installed. Download it from python.org.

Dependencies:

Install required Python libraries. Run this command in your terminal: pip install discord.py python-dotenv openai yt-dlp

2. Setting Up the .env File

Create a .env file in the root directory of the project. Add the following keys to the file: DISCORD_TOKEN=Your_Discord_Bot_Token OPENAI_API_KEY=Your_OpenAI_API_Key Replace Your_Discord_Bot_Token with your bot token from the Discord Developer Portal. Replace Your_OpenAI_API_Key with your API key from OpenAI.

3. Adding the Bot to Your Server

Go to the Installation section in the Discord Developer Portal. Under Install Link, copy the provided link. Open the link in your browser and select the server where you want to add the bot. Confirm the permissions and authorize the bot.

4. Running the Bot

Open your terminal in the project directory. Run the bot with: python bot.py If the setup is correct, the bot will connect to Discord and become active on your server.

5. Music Features (Optional)

If you want to use the bot's music-playing commands:

Ffmpeg is included in this repo. but you just need to change it to your directory:

Troubleshooting

If the bot doesn't start, ensure the .env file is configured correctly. Check the terminal for error messages and verify that all required libraries are installed.