An AI Telegram bot with an Argentine personality.
It streams replies, remembers conversations, understands media, tracks markets, manages AI credits, and runs scheduled tasks.
Try it: t.me/respondedorbot
- Chat with AI, memory, web search, tools, and provider fallback
- Transcribe audio or YouTube captions and describe images or GIFs
- Summarize YouTube videos from their existing captions
- Summarize conversations
- Show crypto, market, dollar, BCRA, weather, and Polymarket data
- Manage Telegram Stars, AI credits, transfers, and charge history
- Create recurring or one-time scheduled tasks
- Repair supported links and handle localized Telegram commands
- Rust 1.98
- PostgreSQL
- Redis Stack with RediSearch
- FFmpeg
cp .env.example .envEdit .env and set these values:
| Variable | What it is for |
|---|---|
TELEGRAM_TOKEN |
Telegram bot token from BotFather |
TELEGRAM_USERNAME |
Bot username, with or without @ |
SUPABASE_POSTGRES_URL |
PostgreSQL database URL |
COINMARKETCAP_KEY |
Crypto market data |
OPENROUTER_API_KEY |
AI chat, vision, summaries, and audio transcription |
Create both workspace/SOUL.md and workspace/RULES.md with nonempty text.
These files are the only source of the bot’s personality and response rules.
Redis uses localhost:6379 by default. See .env.example for
optional providers, monitoring, polling, and maintenance settings.
cargo build --locked --release -p botd
set -a
. ./.env
set +a
./target/release/botd --check-config./target/release/botdStop it with Ctrl+C. The bot waits for background work to finish before it
exits.
Important
For Supabase, use the session pooler on port 5432 with sslmode=require.
Do not use the transaction pooler on port 6543.
| Command | Purpose |
|---|---|
/ask, /pregunta, /che, /gordo |
Chat with AI |
/resumen, /summary, /tldr |
Summarize the conversation |
/transcribe, /transcript, /describe |
Transcribe audio or YouTube captions; describe images or GIFs |
| Command | Purpose |
|---|---|
/p, /prices, /precios |
Crypto and traditional markets |
/c, /cripto, /criptos, /crypto, /cryptos |
Crypto prices and conversions |
/clima, /weather |
Current weather |
/dolar, /dollar, /usd |
Dollar rates |
/s, /accion, /acciones, /stock, /stocks |
Stock prices |
/petroleo, /oil |
Oil prices |
/eleccion, /elections |
Polymarket elections |
/bcra, /variables |
BCRA variables |
/devo, /rulo |
Arbitrage calculations |
/powerlaw, /rainbow, /satoshi |
Bitcoin reference models |
| Command | Purpose |
|---|---|
/config, /settings |
Chat settings |
/language, /idioma |
Language settings |
/topup, /balance |
Add or check AI credits |
/charges, /history, /gastos |
Credit history |
/transfer |
Move credits to a group |
/tarea, /task, /tareas, /tasks |
Manage scheduled tasks |
/random, /convertbase, /comando, /time |
Utilities |
/gm, /gn, /help, /instance |
Greetings and bot information |
/p and its aliases resolve cryptocurrencies, stocks, company names, and tokens.
/c keeps lookup restricted to crypto. Canonical assets take priority over DEX
namesakes: /c bitcoin resolves BTC and /p apple resolves AAPL. Use stock: or
crypto: to disambiguate. A single asset gets a chart; comma-separated lists
such as /p btc,timba combine market and token quotes. Bare /c, /p, top-N
lists, stablecoin lists, and conversion options retain their provider list
behavior.
Full Solana/EVM addresses, $ticker messages, and CoinMarketCap/CoinGecko
token URLs share the command resolver. Addresses preserve case and pin the
token identity; symbol searches require an exact match. Ambiguous tickers keep
their distinct chain and contract identities so the bot can ask which token
you mean. DexScreener and pump.fun supply token cards. Missing chart history
or photo delivery falls back to the available quote/card text, and missing
metrics are shown as N/A. Pump.fun bonding-curve tokens use pump.fun’s candle feed
for explicit chart ranges. When only an older trade is available, the chart
shows its price across the window and labels it “last available trade price”.
Chart ranges use h (hours), d (days), w (weeks),
m or mo (30-day months), and y (365-day years), for example /c bitcoin 1m,
/c bitcoin 7d, /p apple 1y, or /s AAPL 5y. Candle granularity is
selected automatically. Charts label the dates actually returned by the
provider; newly created tokens and unavailable history cannot fill an older
requested range. For a single cryptocurrency or stock with an explicit range,
a successful chart caption derives its change from that range and labels it
with the requested period. If the provider cannot supply usable history,
delivery falls back to the available quote and says that the chart is
unavailable. Without an explicit range, the caption keeps the default daily
change.
Foreground AI conversations emit single-line AI trace: JSON records to stderr,
captured by the container journal. Each record includes the operation ID and
provider round. Events show available tools, provider generation IDs, requested
tool calls, execution duration, and the final executed-tool count (including zero).
Search events include the query, up to five source URLs/titles/snippets, empty
results or an error, and the provider request ID when available.
podman logs --since 15m --timestamps systemd-respondedorbot 2>&1 | grep 'AI trace:'Match operation_id across records to follow one conversation turn. Search
queries and snippets are logged with length limits; URL credentials, query
parameters, and fragments are omitted. Other tool outputs, chat history, and
assistant response bodies are not logged. These records are not sent to Telegram.
Run the same checks used by pull requests:
cargo fmt --all -- --check
cargo check --locked --workspace --all-targets --all-features
cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
cargo test --locked --workspace --all-featuresIntegration tests use synthetic data. Set TEST_REDIS_URL,
TEST_POSTGRES_URL, and TEST_DATABASE_URL to include Redis Stack and
PostgreSQL tests.
Coverage requirements:
bot-core: 95%bot-adapters: 95%botd: 95%
More detail: Testing
botd Starts the app and connects all services
|
+-- bot-adapters Telegram, HTTP, Redis, PostgreSQL, AI, and media
|
+-- bot-core Parsing, routing, state machines, and domain rules
Dependencies point toward bot-core. External payloads are decoded in
bot-adapters, while deterministic behavior stays in bot-core.
| Path | Contents |
|---|---|
crates/bot-core |
Domain behavior and state machines |
crates/bot-adapters |
External service implementations |
crates/botd |
Executable and composition root |
docs |
Architecture, persistence, billing, and testing |
quadlets, systemd |
Deployment and maintenance units |
Containerfile |
Rust-only production image |
Read more: Architecture · Billing · Persistence
Show deployment commands
podman build --tag respondedorbot:local .
mkdir -p ~/.config/containers/systemd
mkdir -p ~/.config/systemd/user
mkdir -p ~/respondedorbot/workspace
cp quadlets/* ~/.config/containers/systemd/
cp systemd/respondedorbot-maintenance.* ~/.config/systemd/user/
cp systemd/respondedorbot-podman-prune.* ~/.config/systemd/user/
cp .env.example ~/respondedorbot/.env
podman run --rm --env-file ~/respondedorbot/.env \
-v ~/respondedorbot/workspace:/app/workspace:ro \
respondedorbot:local /usr/local/bin/botd --check-config
systemctl --user daemon-reload
systemctl --user enable --now respondedorbot-maintenance.timer
systemctl --user enable --now respondedorbot-podman-prune.timer
systemctl --user start respondedorbot-redis.service
systemctl --user start respondedorbot.serviceBefore starting, edit ~/respondedorbot/.env and add the personality files to
~/respondedorbot/workspace/SOUL.md and ~/respondedorbot/workspace/RULES.md.
The runtime image contains botd, FFmpeg, and native shared libraries. CI
publishes latest and immutable sha-<full-commit-sha> images.
To roll back, pin the Quadlet Image= setting to a verified SHA tag, reload
the user units, and restart the service.
Warning
Never run two pollers with the same Telegram token.