2026-09-08 04:00:32 -04:00
2024-05-10 04:03:17 -04:00
2026-09-08 04:00:32 -04:00
2024-05-10 18:20:12 -04:00
2026-09-08 04:00:32 -04:00
2024-05-10 17:19:59 -04:00

🐸 Dank Bot

A Discord bot built with discord.py, featuring a plugin-based architecture for extensible functionality.

Features

  • Plugin System: Easily add new features by dropping a plugin into the plugins/ directory
  • BotChat Plugin: AI-powered chat responses with configurable prompts
  • Pepe Plugin: Classic Pepe meme reactions
  • Logging: Full command and message logging via Python's logging module

Current Plugins

Plugin Description
botchat AI chat plugin with prompt templates and censorship support
pepe Pepe meme reaction plugin

Prerequisites

Quick Start (Docker)

1. Create a token file

Create a .token file with your Discord bot token:

echo "YOUR_DISCORD_BOT_TOKEN_HERE" > .token

2. Build and run

# Build the Docker image
docker build -t dank-bot .

# Run the bot
docker run -d \
  --name dank-bot \
  --env DISCORD_TOKEN=$(cat .token) \
  dank-bot

Note: The bot reads its token from a .token file at runtime. Mount it as a volume:

docker run -d \
  --name dank-bot \
  -v $(pwd)/.token:/app/.token:ro \
  dank-bot

Prerequisites (Local)

Local Setup

1. Create a token file

Create a .token file with your Discord bot token:

echo "YOUR_DISCORD_BOT_TOKEN_HERE" > .token

2. Install dependencies

pip install -r requirements.txt

3. Run the bot

python main.py

Project Structure

dank-bot-py/
├── main.py              # Bot entry point
├── requirements.txt     # Python dependencies
├── start.sh             # Quick start script
├── .token               # Discord bot token (DO NOT COMMIT)
├── .gitignore
├── .dockerignore
├── Dockerfile
├── README.md
└── plugins/
    ├── botchat/         # AI chat plugin
    │   ├── plugin.py
    │   ├── settings.yaml
    │   └── prompts/     # Prompt templates
    │       ├── default.txt
    │       ├── default-censored.txt
    │       ├── summarize.txt
    │       └── summarize-search.txt
    └── pepe/            # Pepe meme plugin
        ├── plugin.py
        └── pepes.txt

Adding a New Plugin

  1. Create a new directory under plugins/
  2. Add a plugin.py file with your bot extension code
  3. The bot will auto-discover and load it on startup

Commands

Command Description
!help List available commands
!chat <message> Send a message to the AI chat (via botchat plugin)
!pepe Trigger a Pepe meme reaction

Configuration

  • BotChat: Edit plugins/botchat/settings.yaml for plugin settings
  • Prompts: Modify files in plugins/botchat/prompts/ to customize AI behavior
  • Token: Store in .token (never commit this file)

Docker

Build

docker build -t dank-bot .

Run

docker run -d \
  --name dank-bot \
  --restart unless-stopped \
  -v $(pwd)/.token:/app/.token:ro \
  dank-bot

Logs

docker logs -f dank-bot

Stop

docker stop dank-bot

Environment Variables

Variable Description Default
LOG_LEVEL Logging verbosity INFO

Security

  • Never commit your .token file — it's included in .gitignore for this reason
  • The Docker image runs as a non-root user (botuser) for added security
  • Use Docker volume mounts for sensitive files instead of baking them into the image
S
Description
No description provided
Readme
112 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 96.1%
Dockerfile 3.8%