| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An advanced LLM-powered conversational simulation framework for Discord
Featuring autonomous action planning, safety filtering, and multi-provider LLM integration for research and controlled testing
Features • Installation • Configuration • Usage • Documentation
This project is a SOCIAL EXPERIMENT and EDUCATIONAL TOOL designed to study AI interaction patterns.
- ✅ You are using this strictly in private, controlled test environments
- ❌ You will NOT use this on your main personal account (Risk of Permanent Ban)
- ❌ You will NOT use this to spam, harass, or disrupt public servers
- ⚖️ The author assumes NO RESPONSIBILITY for account bans, suspensions, or legal consequences
🔴 USE AT YOUR OWN RISK 🔴
|
|
|
|
# 1. Clone the repository
git clone https://github.com/HighMark-31/Cognitive-User-Simulation.git
cd Cognitive-User-Simulation
# 2. Install dependencies
pip install -r requirements.txt
# 3. Configure environment
cp .env.example .env
# Edit .env with your credentials
# 4. Run the bot
python discord_bot.pyCreate a .env file in the project root:
# ==========================================
# DISCORD CONFIGURATION
# ==========================================
DISCORD_BOT_TOKEN=your_bot_token_here
# ==========================================
# DATABASE CONFIGURATION
# ==========================================
DATABASE_URL=sqlite+aiosqlite:///discord_bot.db
# ==========================================
# LLM PROVIDER SELECTION
# ==========================================
# Options: glm | openai | gemini
LLM_PROVIDER=glm
# ==========================================
# GLM (Zhipu AI) CONFIGURATION
# ==========================================
GLM_API_KEY=your_glm_api_key_here
GLM_BASE_URL=https://z.ai/api/coding/paas/v4
GLM_MODEL=glm-4.7
# ==========================================
# OPENAI CONFIGURATION
# ==========================================
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-5
# ==========================================
# GOOGLE GEMINI CONFIGURATION
# ==========================================
GEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-3.0-flash
# ==========================================
# OPTIONAL SETTINGS
# ==========================================
PRIORITY_GUILD_ID=1320998163615846420| Provider | Get API Key | Documentation |
|---|---|---|
| GLM (Z.ai) | Z.ai | Docs |
| OpenAI | platform.openai.com | Docs |
| Google Gemini | makersuite.google.com | Docs |
python discord_bot.pyThe bot will automatically:
python stats_viewer.pyThe bot autonomously decides what to do next using LLM-based planning:
| Action | Description |
|---|---|
| READ | Read messages from channels to understand context |
| REPLY | Reply to messages in channels |
| SEND | Send new messages to channels |
| DM_REPLY | Reply to direct messages |
| DM_SEND | Send new direct messages |
When a user questions if the bot is an AI:
Switch between providers by changing LLM_PROVIDER in .env:
LLM_PROVIDER=glm # Z.ai GLM-4.7
LLM_PROVIDER=openai # GPT-4o-mini
LLM_PROVIDER=gemini # Gemini 1.5 FlashHard-coded regex patterns block:
┌─────────────────────────────────────┐ │ users │ ├─────────────────────────────────────┤ │ Information about interacted users │ └─────────────────────────────────────┘ ┌─────────────────────────────────────┐ │ messages │ ├─────────────────────────────────────┤ │ All received messages │ └─────────────────────────────────────┘ ┌─────────────────────────────────────┐ │ bot_responses │ ├─────────────────────────────────────┤ │ All bot responses │ └─────────────────────────────────────┘ ┌─────────────────────────────────────┐ │ interactions │ ├─────────────────────────────────────┤ │ Interaction logs │ └─────────────────────────────────────┘ ┌─────────────────────────────────────┐ │ social_test_logs │ ├─────────────────────────────────────┤ │ General social test logs │ └─────────────────────────────────────┘
All data is saved in discord_bot.db (SQLite).
Modify the bot's personality in discord_bot.py:
mood = 'chill' # Options: chill, energetic, serious, playful
personality = 'sarcastic, direct, ironic, sometimes chaotic'Examples:
| User Message | Bot Response |
|---|---|
| "Can someone help me?" | "Tell me, what do you need a hand with?" |
| "This code doesn't work" | "Let's talk—what part doesn't add up?" |
Cognitive-User-Simulation/ │ ├── .env.example # Example environment variables │ ├── discord_bot.py # Main bot entry point ├── LLM_Client.py # LLM provider integration ├── database.py # Database models and operations ├── safety_filter.py # Safety and content filtering ├── stats_viewer.py # Statistics viewer utility │ ├── requirements.txt # Python dependencies ├── LICENSE # Project license └── README.md # This file
This project is for educational and testing purposes only. Use it responsibly.
See LICENSE file for more details.
For issues or questions:
Made with ❤️ for educational and research purposes
⭐ Star this repo if you found it interesting! ⭐
| Back | FazBrowse Home | New Git URL |