Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Danique Discord AI Selfbot (educational)

This repository is an experimental Discord “selfbot” style project that uses LLMs to generate human-like replies (including typing delays) while maintaining simple long-term state (mood/learning/memory) and supporting basic vision (profile-photo/avatars).

Important note (ToS)

“Selfbotting” (running automation on a user account) is a direct violation of Discord’s Terms of Service. Use only for educational purposes on a throwaway/testing account and never on an account you care about.

What it does

The bot runs as a logged-in user and attempts to respond when:

  • you mention it (direct mention)
  • you reply to its message
  • it detects relevant group/private chat patterns (with extra analysis)

It also:

  • simulates delays (typing... and short “thinking” wait)
  • keeps state in data/*.db (SQLite) for emotions, learning, memory, social closeness, and context
  • can proactively message on a schedule (see ProactiveEngine)
  • supports image/vision when you ask about profielfoto/pfp/avatar (it loads the referenced avatar and uses the vision model to describe what is visible)

Requirements

  • Python 3.8+
  • Dependencies: pip install -r requirements.txt
  • Environment variables in .env (see below)

Setup

  1. Install dependencies:
    pip install -r requirements.txt
  2. Copy env template:
    copy .env.example .env
  3. Fill in .env:
    • DISCORD_TOKEN: a Discord user token (not a bot token)
    • AI_API_KEY: API key for the configured AI backend
    • AI_MODEL: model name for the configured backend

Optional / advanced (read from code):

  • AI_BACKEND: groq (default) or ollama
  • OLLAMA_HOST, OLLAMA_MODEL when using ollama
  • GOOGLE_MAPS_API_KEY (maps feature; optional)

Run

Main entrypoint:

python src/core/selfbot.py

The bot also starts a small debug GUI (tkinter) and prints lots of tagged logs like:

  • [PFP] requested_token=...
  • [AVATAR] Geladen profielfoto van ...
  • [IMAGE THOUGHT] ...
  • [AI RESPONSE] -> '...'

Where the bot listens

In src/core/selfbot.py there is a hardcoded whitelist:

  • an allowed ALLOWED_GUILD
  • an allowed ALLOWED_CHANNEL
  • a specific ALLOWED_GROUP_DM

If the bot doesn’t respond, check that you’re messaging in the allowed places (or update those constants in code).

Troubleshooting

  • No responses: verify you’re in the allowed guild/channel or using the mention/reply triggers.
  • Vision doesn’t work:
    • ensure AI_API_KEY and AI_BACKEND are set correctly
    • check logs for [IMAGE] Vision model: and [IMAGE SCAN]
  • “weet ik niet / weet niet” answers on pfp questions: the project includes evasiveness guards and retries for avatar questions; watch for [PFP OVERRIDE] / [PFP RETRY] in the logs.

Data & persistence

All memory/state is stored under data/ as SQLite DB files:

  • data/emotions.db
  • data/learning.db
  • data/memory.db
  • data/social.db
  • data/context.db
  • data/conversation_analyzer.db
  • data/history.db (recent message history)

Do not commit secrets (especially .env) to version control.

About

This project is a functional demonstration for a case study explore the current capabilities of AI-driven automation on social platforms, specifically Discord.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages