SmartQuoteBot is a lightweight, intelligent Discord bot that listens for user messages and responds with a relevant quote from a bot managed, extendible database. Built for efficiency and minimal hosting costs, it is designed to run smoothly even on low-power devices like the Orange Pi 3B.
- 🔎 Semantic quote matching: Finds quotes similar to the message meaning when a topic match is detected.
- ⚡ Low resource usage: Optimized for ARM64 systems
- 🛠️ Easy deployment: Docker-based setup with multi-architecture builds (
linux/amd64andlinux/arm64).
git clone https://github.com/Nullpoint56/SmartQuoteBot.git
cd SmartQuoteBotCreate a .env file based on .env.example:
cp .env.example .envEdit .env and set your bot's token and settings:
DISCORD_TOKEN=your-bot-token-here
BOT_PREFIX=!docker build -t smartquotebot .
docker run --env-file .env smartquotebotOr pull the prebuilt image from Docker Hub.
| Component | Description |
|---|---|
| Semantic Search | Selects the most contextually relevant quote from a quote dataset. |
| Discord Bot | Listens for messages, applies the classifier, and sends back appropriate responses. |
| Docker Support | Multi-platform builds for both x86 and ARM64 architectures. |
uv is a fast Python package manager that replaces pip and pip-tools. This project uses uv exclusively to manage dependencies.
winget install --id=astral-sh.uv -eFollow the official standalone installer instructions: https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
uv pip installThis reads directly from
pyproject.tomlanduv.lockto create a reproducible environment.
The Dockerfile and GitHub Actions workflow support multi-architecture builds.
To manually build for ARM64:
docker buildx build --platform linux/arm64 -t smartquotebot-arm64 .Alternatively, use the provided GitHub Actions workflow to auto-publish multi-architecture images.
- Implement a custom classifier for improved detection
- Add support for slash commands (
/quote) - Add RKNN NPU acceleration
- Refactor code to be more modular, robust and extendible
This project is licensed under the MIT License.
- discord.py — Discord API library
- sentence-transformers — Model inference backend library
- faiss — Efficient smiliraity search library