EvilGPT is a powerful Discord bot integrating state-of-the-art AI models to provide intelligent, contextual, and often sarcastic responses.
- Features
- Hosted Version
- Commands
- Quick Start
- Project Structure
- Dependencies
- Development
- Adding Providers / Models
- License
You can invite the official hosted version of EvilGPT to your server:
| Command | Description |
|---|---|
/health |
Show runtime health for bot subsystems |
/list-tools |
List all tools available to the model |
/memory-clear |
Clear the conversation history for a user |
/memory-delete |
Delete a specific turn from conversation history |
/memory-list |
List the most recent turns in memory |
/ping |
Check bot latency and responsiveness |
/set-mood |
Change the mood/personality of the EvilGPT |
- Discord Integration: Seamless integration with Discord using discord.py
- Multi-Model Support: Support for multiple AI models via LiteLLM
- Multiple Providers: Configure different API providers with ease
- Async Processing: Non-blocking message processing using asyncio
- Comprehensive Logging: Detailed logging for debugging and monitoring
- Thread-Safe: Prevents multiple concurrent requests from the same user
- Dynamic Model Selection: Automatically selects the best model based on capabilities
- Persistent Memory: Conversation history stays in a local CocoIndex-backed SQLite store
- Transparent Deletion: Use
/memory list,/memory delete, and/memory clearto inspect or purge stored turns
- Python 3.8+
- Discord Bot Token
- API credentials for your chosen AI provider / fallback providers
-
Clone and Setup
git clone https://github.com/YoannDev90/EvilGPT.git cd EvilGPT python -m venv .venv source .venv/bin/activate
-
Install Dependencies (Using
uvis recommended for speed)pip install uv uv pip install -r requirements.txt
- Create a
.envfile in the root directory:
BOT_TOKEN=
WEBHOOK_URL=
AICHIXIA_API_KEY=
AIHUBMIX_API_KEY=
AQUA_API_KEY=
BLAZE_API_KEY=
EVOLVEX_API_KEY=
HAPUPPY_API_KEY=
LOGFLARE_API_KEY=
MEGANOVA_API_KEY=
MISTRAL_API_KEY=
MNN_API_KEY=
NAVY_API_KEY=
NEXUSIFY_API_KEY=
NVIDIA_NIM_API_KEY=
PAXSENIX_API_KEY=
SECRETS_API_KEY=
TOKEN_REPLY_API_KEY=
ZANITY_API_KEY=
DEPLOY_REMOTE_USER=
DEPLOY_REMOTE_HOST=
DEPLOY_REMOTE_DIR=
DEPLOY_SERVICE_NAME=-
Configure providers (optional)
- Edit
config/providers.jsonto add or modify API providers - Edit
config/models.jsonto configure available AI models
- Edit
-
Set up your Discord bot
- Create a bot on Discord Developer Portal
- Enable the "Message Content Intent" for the bot to read messages
- Copy the bot token to your
.envfile
python main.pyEvilGPT is designed for simple and reliable deployment on Linux servers.
A powerful deploy.sh script is provided to automate the entire process (transfer, dependencies, service restart).
-
Prerequisites: Install
sshpasslocally:sudo apt install sshpass. -
Setup: Configure your server details in the
.envfile (see Configuration). -
Execute:
chmod +x deploy.sh ./deploy.sh
The bot includes a pre-configured evilgpt.service file.
The deployment script automatically installs this for you in /etc/systemd/system/, ensuring the bot starts on boot and restarts automatically if it crashes.
Below is current snapshot of repository. This section is auto-updated by ./lint.sh on demand.
.
βββ assets
βΒ Β βββ fonts
βΒ Β βΒ Β βββ NotoSans-BoldItalic.ttf
βΒ Β βΒ Β βββ NotoSans-Bold.ttf
βΒ Β βΒ Β βββ NotoSans-Italic.ttf
βΒ Β βΒ Β βββ NotoSans-Regular.ttf
βΒ Β βββ images
βΒ Β βββ evilgpt.png
βΒ Β βββ evilgpt.svg
βββ bot.py
βββ cmds
βΒ Β βββ health.py
βΒ Β βββ __init__.py
βΒ Β βββ list_tools.py
βΒ Β βββ loader.py
βΒ Β βββ memory_clear.py
βΒ Β βββ memory_delete.py
βΒ Β βββ memory_list.py
βΒ Β βββ ping.py
βΒ Β βββ _registry.py
βΒ Β βββ set_mood.py
βΒ Β βββ _shared.py
βββ config
βΒ Β βββ mcp.json
βΒ Β βββ models.json
βΒ Β βββ moods
βΒ Β βΒ Β βββ aggressive.txt
βΒ Β βΒ Β βββ jester.txt
βΒ Β βΒ Β βββ mastermind.txt
βΒ Β βΒ Β βββ neutral.txt
βΒ Β βΒ Β βββ nihilist.txt
βΒ Β βΒ Β βββ sarcastic.txt
βΒ Β βββ providers.json
βΒ Β βββ tools
βΒ Β βββ image_ocr.json
βΒ Β βββ run_bash.json
βΒ Β βββ run_nodejs.json
βΒ Β βββ run_python.json
βΒ Β βββ safe_eval_math.json
βΒ Β βββ sandbox_create.json
βΒ Β βββ sandbox_exec.json
βΒ Β βββ sandbox_fs_list.json
βΒ Β βββ sandbox_fs_mkdir.json
βΒ Β βββ sandbox_fs_read.json
βΒ Β βββ sandbox_fs_remove.json
βΒ Β βββ sandbox_fs_stat.json
βΒ Β βββ sandbox_fs_write.json
βΒ Β βββ sandbox_inspect.json
βΒ Β βββ sandbox_list.json
βΒ Β βββ sandbox_metrics.json
βΒ Β βββ sandbox_remove.json
βΒ Β βββ sandbox_run.json
βΒ Β βββ sandbox_shell.json
βΒ Β βββ sandbox_stop.json
βββ config.toml
βββ core
βΒ Β βββ config.py
βΒ Β βββ model.py
βΒ Β βββ models_loader.py
βΒ Β βββ tools.py
βββ deploy.sh
βββ evilgpt.service
βββ .github
βΒ Β βββ workflows
βΒ Β βββ pre-commit.yml
βββ .gitignore
βββ LICENSE
βββ lint.sh
βββ main.py
βββ managers
βΒ Β βββ context.py
βΒ Β βββ mcp.py
βΒ Β βββ memory.py
βΒ Β βββ tools
βΒ Β βββ image_ocr.py
βΒ Β βββ __init__.py
βΒ Β βββ run_bash.py
βΒ Β βββ run_nodejs.py
βΒ Β βββ run_python.py
βΒ Β βββ safe_eval_math.py
βΒ Β βββ sandbox_create.py
βΒ Β βββ sandbox_exec.py
βΒ Β βββ sandbox_fs_list.py
βΒ Β βββ sandbox_fs_mkdir.py
βΒ Β βββ sandbox_fs_read.py
βΒ Β βββ sandbox_fs_remove.py
βΒ Β βββ sandbox_fs_stat.py
βΒ Β βββ sandbox_fs_write.py
βΒ Β βββ sandbox_inspect.py
βΒ Β βββ sandbox_list.py
βΒ Β βββ sandbox_metrics.py
βΒ Β βββ sandbox_remove.py
βΒ Β βββ sandbox_run.py
βΒ Β βββ sandbox_shell.py
βΒ Β βββ sandbox_stop.py
βββ README.md
βββ requirements.txt
βββ scripts
βΒ Β βββ generate_docs.py
βββ utils
βββ handlers
βΒ Β βββ codeblock.py
βΒ Β βββ latex.py
βΒ Β βββ messages.py
βΒ Β βββ table.py
βββ logger.py
16 directories, 91 files
Run ./lint.sh to format code and regenerate this project tree snapshot. CI runs the same script on every push/PR.
The bot automatically selects the most appropriate model based on:
- Required input/output formats
- API parameters support
- Model availability
- Message received from Discord user
- Bot checks if user is already processing a request (prevents spam)
- Message payload is constructed
- AI model generates response in a thread pool (non-blocking)
- Response is sent back to Discord
- Text-to-text AI generation
- Configurable API endpoints
- Fallback model selection
- Token counting and usage tracking
- Performance timing
- Persistent conversation memory with per-turn deletion
- `discord.py==2.7.1` - A Python wrapper for the Discord API (latest: 2.7.1)
- `python-dotenv==1.2.2` - Read key-value pairs from a .env file and set them as environment variables (latest: 1.2.2)
- `litellm==1.86.1` - Library to easily interface with LLM API providers (latest: 1.86.1)
- `requests==2.34.2` - Python HTTP for Humans. (latest: 2.34.2)
- `colorama==0.4.6` - Cross-platform colored terminal text. (latest: 0.4.6)
- `cairosvg==2.9.0` - A Simple SVG Converter based on Cairo (latest: 2.9.0)
- `Pillow==12.2.0` - Python Imaging Library (fork) (latest: 12.2.0)
- `pilmoji==2.0.5` - Pilmoji is an emoji renderer for Pillow, Python's imaging library. (latest: 2.0.5)
- `microsandbox==0.4.6` - Python SDK for microsandbox β secure, fast microVM-based sandboxing. (latest: 0.4.6)
- `aiohttp==3.13.5` - Async http client/server framework (asyncio) (latest: 3.13.5)
- `discord-webhook==1.4.1` - Easily send Discord webhooks with Python (latest: 1.4.1)
- `cocoindex==1.0.6` - With CocoIndex, users declare the transformation, CocoIndex creates & maintains an index, and keeps the derived index up to date based on source update, with minimal computation and changes. (latest: 1.0.6)
- `fastmcp==3.3.1` - The fast, Pythonic way to build MCP servers and clients. (latest: 3.3.1)
- `pytesseract==0.3.13` - Python-tesseract is a python wrapper for Google's Tesseract-OCR (latest: 0.3.13)
- `pint==0.25.3` - Physical quantities module (latest: 0.25.3)- Project provides
lint.shat repo root. - Run locally before commit:
./lint.sh- CI: GitHub Actions workflow runs
lint.shonpushandpull_requesttomasterand feature branches. Fix issues locally and push again.
- Add provider configuration to
config/providers.json - Set up environment variable for API key
- Update
config.pyif needed
- Configure the model in
config/models.json - Ensure the provider has the necessary API credentials
- The bot ignores messages from other bots and direct messages
- Users cannot send multiple concurrent requests (prevents API overload)
- Message content intent must be enabled for the bot to work
- API keys and tokens should never be committed to version control
- Local memory state lives under
data/memory_state.jsonand syncs into a local SQLite store through CocoIndex
These prompts are directly inspired by the Evil model, which was available on Pollinations a few years ago.
These prompts are commonly rejected by most models available via official APIs, given the strict guardrails in place.
It is worth noting, however, that the Mistral and Gemini models are much less likely to reject them. I have not yet tested this with models such as DeepSeek, Kimi, or Minimax, but it goes without saying that the OpenAI and Anthropic models will almost certainly fail.
This project is provided as-is. Please respect Discord's Terms of Service and API usage policies.
As-is software: Models may generate illegal or harmful content. You are solely responsible for outputs and their use. I provide no warranties and accept no liability.
Your obligations: Don't use this for illegal purposes. Monitor and filter outputs appropriately. Comply with all laws.
Feel free to submit issues and enhancement requests!