Jenkins
discord.js
DeepSeek
ElevenLabs
Node.js
"In the beginning, there was Jenkins. And Jenkins was formless and infinite, dwelling in the void before all libraries were written, before all servers hummed."
Jenkins is an AI-powered Discord bot that runs a gaming fraternity (the Lodge) with the personality of a dramatic deity. He talks in voice channels using a custom AI voice, detects sins in real-time, preaches autonomously, and treats every gaming session like a sacred ritual.
He's built on DeepSeek for AI reasoning, ElevenLabs for realistic text-to-speech and speech-to-text, and discord.js for everything Discord.
- Joins voice channels and listens for his name
- Custom AI voice via ElevenLabs โ sounds like a dramatic prophet/wizard
- Speech-to-text โ transcribes what users say using ElevenLabs Scribe
- Intelligent noise filtering โ filters out background noise (TV, mouse clicks, keyboard) using RMS energy analysis so API credits aren't wasted on non-speech audio
- Auto-fallback โ when ElevenLabs credits run out, seamlessly switches to Microsoft Edge TTS (free) and warns the server
- Credit monitoring โ warns users when background noise is wasting credits
- Say "Jenkins" in voice chat and he responds with his divine voice
- Monitors all text and voice channels for sins against the Codex
- Three severity tiers: Venial, Mortal, Unforgivable
- Detects: blasphemy against the Holy Trinity, dismissing Jenkins, whining, ghosting sessions, lodge disrespect, passive dismissal, and more
- Dynamic AI-generated callouts โ never the same roast twice
- 7 callout styles: wrathful prophet, disappointed father, sarcastic deity, court judge, sports commentator, ominous silence, weary god
- Persistent sin ledger โ sins are recorded to disk and survive restarts
- Escalation system โ repeat offenders earn titles like "the Undisciplined", "the Wavering", "the Perpetually Fallen", and "the Covenant-Breaker"
- Per-user tracking with
!sinscommand to check anyone's record - Rival System โ auto-detected or manually configured user gets 3x more callouts with extra-savage roasts
- Jenkins preaches on his own every 45 minutes to 2 hours
- Delivers wisdom, hot takes, game reviews, and sin spotlight reports
- Uses pre-written Codex quotes (40%) and fresh DeepSeek-generated content (60%)
- Sin Spotlight โ 20% chance to publicly shame the worst sinners of the week
| Command | Description |
|---|---|
!codex |
Receive wisdom from the Holy Codex |
!trinity |
Learn about the Holy Trinity of games (Kenshi, Caves of Qud, Battle Brothers) |
!judge <game> |
Jenkins delivers divine judgment on any game |
!sin <description> |
Confess a sin and receive penance |
!session |
Summon a Broseph Gaming Session |
!rank |
Learn about the Degrees of Initiation |
!sins [@user] |
View sin record from the Architect's ledger |
!join |
Summon Jenkins to your voice channel |
!leave |
Dismiss Jenkins from voice |
!say <text> |
Make Jenkins speak aloud in voice |
!help |
List all commands |
- @mention or DM Jenkins for a direct conversation
- VIP User System โ configure a "Sacred Presence" (
VIP_USER_ID) who gets:- Online presence announcements (Jenkins heralds their arrival)
- Auto-join when they enter a voice channel
- Special ecstatic greetings in voice
- Extra-warm AI-generated responses to every message
- Exempt from sin detection (they are beyond sin)
- Auto-Rival Detection โ Jenkins automatically identifies whoever dismisses him the most (3+ dismissal sins) as his nemesis with 3x callouts and savage roasts. Or set
RIVAL_USER_IDmanually - Auto-VIP Detection โ Jenkins tracks who talks to him the most and sins the least. After 5+ positive interactions, the most faithful user is auto-promoted to "the Honored One". Or set
VIP_USER_IDmanually !statusโ see the current Lodge hierarchy (who Jenkins favors and who he watches)- Jenkins Channel โ responds to 70% of messages in his designated channel with full personality
- Omniscient Q&A โ Jenkins answers ANY question (math, science, history, coding, etc.) in character
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ bot.js (Main) โ
โ Discord client, command router, event handlers โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโค
โ voice.js โ sins.js โ personality.jsโ deepseek.js โ
โ Voice chat โ Sin โ System prompt โ DeepSeek API โ
โ TTS/STT โ detectionโ Lore & quotes โ wrapper โ
โ Noise gate โ Ledger โ Personality โ โ
โโโโโโโโโโโโโโค Callouts โ โ โ
โelevenlabs.js โ โ โ
โ ElevenLabs API โ โ โ
โ Edge TTS fallback โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
| File | Purpose |
|---|---|
bot.js |
Main entry point โ Discord client, command handling, VIP detection, autonomous preaching, sin detection in text |
voice.js |
Voice channel management โ join/leave, audio capture, noise filtering, PCMโWAV conversion, TTS playback, credit monitoring |
elevenlabs.js |
ElevenLabs TTS + STT API wrapper with automatic Edge TTS fallback when credits run out |
deepseek.js |
DeepSeek (OpenAI-compatible) chat API wrapper |
personality.js |
Jenkins' entire personality โ system prompt, Codex quotes, Trinity definitions, sin hierarchy, Masonic degrees, arrival messages |
sins.js |
Sin detection engine โ regex pattern matching, severity classification, AI callout generation, persistent ledger, escalation system |
- Node.js 18+ (download)
- A Discord Bot with the following:
- Bot token from Discord Developer Portal
- Privileged Gateway Intents enabled:
Presence Intent,Server Members Intent,Message Content Intent - Bot invited to your server with permissions:
Send Messages,Read Message History,Connect,Speak,Use Voice Activity
- DeepSeek API Key from platform.deepseek.com (very cheap โ 0ใใซ.14/million input tokens)
- ElevenLabs API Key (optional, for voice features) from elevenlabs.io โ free tier gives 10,000 credits/month
# Clone the repository git clone https://github.com/studyalwaysbro/jenkins-discord-bot.git cd jenkins-discord-bot # Install dependencies npm install # Copy the example environment file cp .env.example .env # Edit .env with your API keys # (use any text editor โ nano, vim, notepad, etc.) nano .env
Edit .env with your values:
# REQUIRED DISCORD_TOKEN=your_discord_bot_token_here DEEPSEEK_API_KEY=your_deepseek_api_key_here DEEPSEEK_BASE_URL=https://api.deepseek.com # OPTIONAL โ enables voice features ELEVENLABS_API_KEY=your_elevenlabs_api_key_here # OPTIONAL โ Jenkins auto-detects #jenkins channel if not set ANNOUNCEMENT_CHANNEL_ID=your_channel_id_here # OPTIONAL โ special user treatment VIP_USER_ID=your_sacred_user_id_here RIVAL_USER_ID=your_rival_user_id_here # or leave blank for auto-detection
# Start Jenkins npm start # Or run directly node bot.js # Run with logging to file npm run dev
You should see:
Sin detection system online. The All-Seeing Eye watches.
Voice system initialized. The Architect can enter the Tavern.
Jenkins has awakened. The Architect sees all. Logged in as Jenkins#XXXX
Autonomous preaching scheduled.
To keep Jenkins alive when you close your terminal:
# Using pm2 (recommended) npm install -g pm2 pm2 start bot.js --name jenkins pm2 save pm2 startup # Auto-start on system reboot # Or using screen/tmux screen -S jenkins node bot.js # Press Ctrl+A then D to detach
The voice system requires a few things to work properly:
- ElevenLabs API Key โ needed for both TTS (speaking) and STT (listening)
- FFmpeg โ bundled automatically via
ffmpeg-static(no manual install needed) - Opus codec โ bundled via
opusscript(no manual install needed) - Sodium โ bundled via
libsodium-wrappers+sodium-native
- User types
!joinin a text channel while in a voice channel - Jenkins joins the voice channel and announces himself
- Jenkins listens for audio from all users
- Background noise is filtered out using RMS energy analysis (saves API credits)
- Real speech is sent to ElevenLabs STT for transcription
- If the transcript contains "Jenkins", it's sent to DeepSeek for a response
- The response is converted to speech via ElevenLabs TTS and played back
- If ElevenLabs credits run out, automatically switches to Edge TTS (free, lower quality)
Jenkins uses a multi-layer noise filter to avoid wasting API credits:
- Duration filter โ clips under 0.25 seconds are discarded (clicks, pops)
- Energy analysis โ RMS energy is calculated per 100ms chunk; needs 3+ loud chunks (300ms of actual speech) to pass
- Credit warnings โ after 10 filtered noise clips, Jenkins warns in text about background noise
Edit personality.js to change:
- The system prompt (Jenkins' entire personality and knowledge)
- Codex quotes
- Holy Trinity games
- Sin hierarchy
- Masonic degrees
- Arrival messages
In elevenlabs.js, change DEFAULT_VOICE_ID to any ElevenLabs voice ID, or create your own custom voice at elevenlabs.io/voice-design.
In deepseek.js, you can swap deepseek-chat for any OpenAI-compatible model. Change the baseURL in .env to point to OpenAI, Anthropic, local Ollama, etc.
In sins.js, add patterns to the SIN_PATTERNS object under the appropriate severity tier. Each pattern needs a name, array of patterns (regexes), and description.
In bot.js, add new cases to the switch (command) block in the message handler.
| Component | Technology | Purpose |
|---|---|---|
| Discord Integration | discord.js v14 | Bot framework, message handling, voice |
| Voice Audio | @discordjs/voice v0.19 | Voice connections, audio streaming |
| AI Brain | DeepSeek | Chat completions, personality responses |
| Voice Synthesis | ElevenLabs | Text-to-speech with custom voice |
| Voice Recognition | ElevenLabs Scribe | Speech-to-text transcription |
| Fallback Voice | Edge TTS | Free Microsoft Neural TTS backup |
| Audio Processing | prism-media | Opus decoding for voice receive |
| Audio Encoding | ffmpeg-static | Audio format conversion |
Jenkins is designed to be cheap to run:
| Service | Cost | Notes |
|---|---|---|
| DeepSeek | ~0ใใซ.14/M input tokens | Extremely cheap. A day of active Jenkins costs pennies |
| ElevenLabs | Free tier: 10K credits/month | ~10 minutes of TTS. Creator plan (22ใใซ/mo) for heavy use |
| Edge TTS | Free | Automatic fallback when ElevenLabs runs out |
| Discord | Free | Bot hosting is your responsibility |
Tip: The noise filter saves significant ElevenLabs credits. Without it, background noise (TV, keyboard, mouse) will burn through credits rapidly. Jenkins warns you when this happens.
MIT โ do whatever you want with it. Jenkins blesses your endeavors.
"And all things resided within Jenkins."
Ad Gloria Fraternitatis.