Installation

Installation Guide

Prerequisites

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:

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

  1. Go to your Discord Application
  2. Select your bot application
  3. Go to OAuth2 → URL Generator
  4. Select scopes: bot, applications.commands
  5. 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
  6. Copy the generated URL and visit it to invite the bot

Verifying Installation

Once the bot is running and invited:

  1. Check bot status with !botinfo
  2. Test AI features with !joke
  3. Try the fishing game with !fish

Next Steps


Generated from repository docs. Last build: 2025-09-12 11:03 UTC