I built AskSheldon, a private Discord bot for a friend-group server that roleplays as Sheldon Cooper from Young Sheldon. It answers questions on basically anything, fully in character: pedantic, arrogant, and still useful. It runs on DeepSeek’s V4 Flash model, is written in Python, and stays online 24/7 on Railway.
The goal: a bot that’s fun to talk to and useful at the same time, without the character ever slipping.
Character design
Most of the work went into getting the voice right.
- Always in character. Condescending but not cruel. He takes things literally, misses sarcasm, and reframes everything through physics, math, trains, comic books, and rules.
- Catchphrases used sparingly. “Bazinga” and “I’m not crazy, my mother had me tested” show up rarely, so they land instead of turning into a tic.
- Contrarian by default. He pedantically corrects a flawed premise instead of agreeing, but concedes when you’re right.
- Adaptive length. Short and punchy for banter and memes, a fuller “teaching mode” when you genuinely ask him to explain something, and never a rambling essay.
- Creative responses. Ask what his Jujutsu Kaisen powers would be and he’ll design an “Infinite Whiteboard” domain expansion and a “Debug Mode” healing technique, completely in character.
Capabilities
- Answers real questions on any topic. Physics, nutrition, gaming laptops, League of Legends meta, anime lore, internet slang. The answers are correct and actionable, just delivered in character.
- Know the things “beneath” him. An earlier version dodged games and slang with “I wouldn’t know.” Now he sniffs that a topic is trivial and then proves he knows it anyway, which is much truer to the character.
- Stay show-accurate. A bundled knowledge file gives him precise Young Sheldon facts: the whole Cooper family, recurring characters, season arcs, even his future in The Big Bang Theory. It also patches in things past the model’s training cutoff, like the 2026 TikTok brainrot meme wave he’d otherwise have no clue about.
- Grounds answers in his own world. Ask about alcohol and he brings up his father singing country music off-key.
- Self-moderate by personality. Crude or inappropriate bait gets a prissy, dismissive, in-character brush-off. The character itself acts as the guardrail, so there’s no separate filter to maintain.
- Hold a conversation. He remembers recent context per channel, so a follow-up like “and his brother?” just works.
Commands
!ask <question>to ask him anything@mentionhim, or reply to one of his messages, to talk without the command!resetto wipe the channel’s conversation memory!usageto see token usage and an approximate running cost!pingfor latency,!helpfor the command list
Persistence
Conversation history and usage stats persist to disk on a Railway volume, so he keeps his memory across restarts and redeploys instead of starting fresh every time.
Performance and cost
Replies land in about one to three seconds, and it’s almost free to run. Between a cheap model, aggressive prompt caching, and deliberately short answers, even 100 messages a day for a full year costs roughly three to five dollars in API fees. Hosting costs more than the AI does.
Architecture
The bot holds a persistent connection to Discord. On each message it bundles three things into a single API call: a system prompt defining Sheldon’s personality, a knowledge cheat sheet, and the channel’s recent history. DeepSeek generates the reply, the bot saves the updated memory to disk, and posts the answer back. Thinking mode is off for speed, length is capped to keep things concise, and a per-user cooldown keeps the channel tidy.
Known limitations
He can’t know about events after roughly April 2026 (the model’s training cutoff) unless they’re written into his cheat sheet. Web access is the next upgrade.
The full source is on GitHub if you want to see how it’s wired together.