Skip to content
Ryder Lee Smith
All work

xT Discord bot

A Python bot that turns GitHub releases into changelogs and answers support tickets with a self-hosted model, grounded in the docs and source.

Role
Author
Years
2024 - Present
Stack
Python, Local LLM, RAG, discord.py, MCP, Docker
Links
Private repository

Two jobs, one list

The bot announces releases and answers support tickets, and both halves read the same list of plugins. The changelog side maintains it, and the support side indexes exactly those repositories. One list, one token, no drift.

Changelogs from commits

When a GitHub Release is cut, the bot rewrites its commits into one short line per change (added, fixed, changed), lists the changed files and anything a server owner has to do, then posts it to Discord. Plugins with auto-post go out within five minutes with nobody clicking anything. The same pipeline is exposed as an MCP server, so a coding agent can draft and post changelogs too.

Support answers grounded in source

In ticket channels the bot answers from the docs, the plugins’ source code and past changelogs, using a self-hosted Qwen model on my own hardware rather than a paid API.

  • Retrieval: BM25 keyword search over chunked docs and source, with prose and code chunked differently. The files an answer used are cited back as links.
  • Pluggable sources: each knowledge source (the docs site, a GitHub repository, the changelogs) is a skill registered in one module, so adding a source never touches the retrieval or reply logic.
  • Tuned on real failures: the system prompt was revised against answers that went wrong in a live community of 1,500+.

Guardrails that don’t trust the model

The bot must never reproduce source code in a public channel. The system prompt says so, but a model can ignore its instructions, so a mechanical filter strips code from every reply and removes links to private repositories before anything is posted.

Next case study Home dashboard