Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sakura

A Discord self-bot that answers anime trivia questions using DeepSeek AI, for quiz servers.

Disclaimer: Automating user accounts (self-botting) violates Discord's Terms of Service. Using this software will result in account bans. This project is published for educational purposes only. The author assumes no liability for how you use it.

Installation

pip install -r requirements.txt

Copy .env.example to .env and fill in your tokens:

cp .env.example .env

Quick Start

You need a Discord user token (burner account) and a DeepSeek API key.

# 1. Edit .env with your credentials
# 2. Start the bot
python3 main.py

The bot will log in, join the server your burner account is in, and begin listening for quiz questions. Answers appear in the same channel.

Expected output:

[boot] starting bot1 (attempt 1)...
[bot1] ready as your_burner_account (id=...)
[bot1] will stop after 20 answers (slot=0)

Run two bots with separate proxies

Set DISCORD_TOKEN_2 and PROXY_2 in .env. Bot2 spawns as a subprocess through its own proxy — each bot gets a different IP.

python3 main.py
# Boots bot1 (main process) + bot2 (subprocess)

Test locally with a test server

Terminal 1:

python3 main.py

Terminal 2:

venv_testbot/bin/python3 test_bot.py

In your test server, type !q to post a quiz question — the bot answers in-channel. !q5 posts 5 questions 5 seconds apart. See the testing guide for the full command list.

Configuration

Variable Required Purpose
DISCORD_TOKEN Yes Burner Discord user token (bot1)
DEEPSEEK_KEY Yes DeepSeek API key
DISCORD_TOKEN_2 No Second burner token (bot2)
PROXY_1 No Proxy for bot1 (http://user:pass@host:port)
PROXY_2 No Proxy for bot2
EXTRA_HOSTS No Comma-separated user IDs — extra quiz hosts
QUIZ_BOT_ID No Discord user ID of the quiz bot
QUIZ_BOT_NAME No Substring to match the quiz bot's name
MILWL_USER_ID No Discord user ID of milwl's quiz bot
TEST_MODE No 1 to only respond to your test bot
TEST_BOT_ID No Discord user ID of your test bot
TEST_BOT_TOKEN No Discord bot token for test_bot.py
TEST_USER No Your main account name — enables runtime commands
MAX_ANSWERS No Stop after N answers per bot (default: 20)
LISTEN_ONLY No 1 to log questions without answering
SCOUT_MODE No 1 to DM answers privately instead of posting
SCOUT_COUNT No Questions to study before answering (default: 3)
OWNER_ID No Your Discord user ID for scout DMs
PARASITIC No 1 to shadow trusted human answers

Features

  • Dual bots with proxy isolation — Two accounts answer from different IPs via residential proxies
  • DeepSeek AI answers — Anime trivia spanning shows, manga, VAs, composers, and studios
  • Image OCR — Screenshots (Quizlet, Kahoot) are scanned with EasyOCR and answered
  • Dynamic hosts — Add quiz hosts at runtime with !addhost <id>, no restart needed
  • Scout mode — Study a new quiz format privately via DMs before going public
  • Parasitic mode — Shadow trusted humans' answers instead of answering solo
  • Leaderboard-aware coasting — Stops answering when safely in the top 2
  • Connection retry — Handles flaky proxies with 10 retries and exponential backoff

Testing Commands

These are available in your test server from your main account (TEST_USER):

Command Effect
!q Post a random quiz question
!q5 / !q10 Post 5 or 10 questions, 5s apart
!qc <question>|<category> Post a custom question
!testquiz <question>|<category> Test the DeepSeek pipeline
!ping Check if the bot is alive
!addhost <id> Add a user as a quiz host
!drop <id> Remove a dynamic host
!hosts List all recognized hosts

Architecture

The bot parses quiz messages from three formats (sakura embeds, milwl brackets, raw text), runs adversarial checks, queries DeepSeek, and posts an answer with randomized timing and casing. Two bots alternate by question number with an 8% chaos rate to avoid pattern detection.

Full architecture, adversary defenses, and operational modes are documented in ARCHITECTURE.md.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages