Installation
Installation Guide
Prerequisites
- Python 3.10 or higher
- Discord Bot Token (How to get one)
- OpenAI API Key (Get one here)
Step-by-Step Installation
1. Clone the Repository
git clone https://github.com/M1XZG/discord-bot-for-fun.git
cd discord-bot-for-fun
2. Create Virtual Environment
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
3. Install Dependencies
pip install -r requirements.txt
4. Set Up Environment Variables
Create a .env file in the root directory:
DISCORD_TOKEN=your_discord_bot_token_here
OPENAI_API_KEY=your_openai_api_key_here
5. Configure the Bot
The bot will automatically create configuration files on first run:
myconfig.json- Main configurationmy_fishing_game_config.json- Fishing game settings
6. Run the Bot
python main.py
Docker Installation (Alternative)
FROM python:3.10-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "main.py"]
Inviting the Bot to Your Server
- Go to your Discord Application
- Select your bot application
- Go to OAuth2 → URL Generator
- Select scopes:
bot,applications.commands - Select permissions:
- Send Messages
- Send Messages in Threads
- Create Public Threads
- Manage Threads
- Embed Links
- Attach Files
- Read Message History
- Use External Emojis
- Add Reactions
- Copy the generated URL and visit it to invite the bot
Verifying Installation
Once the bot is running and invited:
- Check bot status with
!botinfo - Test AI features with
!joke - Try the fishing game with
!fish
Next Steps
Generated from repository docs. Last build: 2025-09-12 11:03 UTC