This work is licensed under the BSD 2-Clause "Simplified" License.
StickfixBot is a Telegram bot that let's you link stickers with tags to store them and send them more easily.
You can find it at https://t.me/stickfixbot or as @stickfixbot from telegram.
For instructions on how to use the bot, send the command /help to the bot from a telegram chat.
This bot is written in Python 3 and uses the python-telegram-bot API.
The old requirements.txt/venv scripts are now deprecated. Modern contributions should rely on the pyproject.toml metadata and the uv/Ruff workflow described below.
- Install
uvglobally (e.g.,python -m pip install --user uvor see uv docs). - Run
uv syncfrom the repo root to create or refresh the locked virtual environment defined byuv.lock. - When the dependency graph changes, update it with
uv lockand commit bothpyproject.tomland the regenerateduv.lock.
The project targets Python 3.14, so ensure uv is pointing to a compatible interpreter (uv python list/uv python use).
uv run ruff check— run lint rules and formatting checks defined inruff.toml.uv run ruff format— autoformat files that need cleanup.uv run pytest— execute the test suite (or pass-- -k <pattern>for subsets).uv run python -m bot.stickfix— run the bot or other scripts through the locked environment.uv run python -m pip install --upgrade --requirement requirements.txt— legacy compatibility mode, use only when interacting with legacy tooling; prefer thepyprojectextras for new work.
Use uv sync --extra db to install the PostgreSQL stack (psycopg, pgvector, sqlmodel) or uv sync --extra graph for the Neo4j drivers. Add --extra dev when working on tests, typing, or CI helpers.
CI jobs should now run uv sync, uv run ruff check, and uv run pytest, then optionally invoke migration verification scripts. Describe any new steps in .github/workflows.
When dependency metadata changes (new package, extra, or constraint fix), run uv lock locally or as part of a prow job, review the diff, and commit the updated pyproject.toml + uv.lock. This keeps the locked graph reproducible for every contributor.
- Python 3.14+ — Verify with
python --versionor install via python.org. - uv — Install globally:
python -m pip install --user uvor follow uv installation docs. - Telegram Bot Token — Obtain from @BotFather on Telegram:
- Send
/newbotand follow the prompts - Save the API token provided
- Send
-
Clone the repository:
git clone https://github.com/r8vnhill/stickfix.git cd stickfix -
Install dependencies:
uv sync
-
Create a token configuration file (
secret.yml— never commit this):token: "YOUR_BOT_TOKEN_HERE"
-
Create the bot entry point (
bot.py— gitignored):from bot.stickfix import Stickfix import yaml with open('secret.yml') as f: token = yaml.safe_load(f)['token'] Stickfix(token).run()
Start the bot with:
uv run python bot.pyThe bot will:
- Create
data/users.yamlfor sticker storage (auto-backed up every 5 minutes) - Create
logs/stickfix.logfor logging - Listen for commands and inline queries on Telegram
Press Ctrl+C to stop the bot gracefully.
- Open Telegram and search for your bot by username
- Send
/startor/helpto see available commands - Try adding a sticker with
/add tag1 tag2(reply to a sticker) - Test inline queries by typing
@yourbotusername tag1in any chat
- Import errors: Run
uv syncto ensure all dependencies are installed - Token errors: Verify your token in
secret.ymlmatches the one from BotFather - Permission errors: Ensure
data/andlogs/directories are writable - Bot not responding: Check
logs/stickfix.logfor error messages