The Telegram bot
The bot is optional. It is another way to press the same buttons you already press on screen.
What this bot is
A second container, running beside the app. You message it from your phone and it opens the same flows the screens open — Reup, Review, Affiliate — plus a few questions about work in progress.
The bot does nothing on its own. It writes a row into the database, the app reads that row and calls exactly what the screens call. Which means stopping the bot mid-run does not kill the running job — the work is in the app, not in the bot.
The bot's menu is buttons, and each stands for a command: Reup, Review, Affiliate, Jobs, Status, Trợ giúp. A pressed button and a typed command do the same thing.
Turning it on
-
Get a token from BotFather
In Telegram, message @BotFather, type/newbotand answer its questions. It hands back a token.1234567890:AAHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -
Get your own numeric id from userinfobot
This is a separate step, and the one people skip: message @userinfobot and it returns your numeric id. The bot's token and the user's id are two different things. -
Paste both into Settings
Open the app, go to Cấu hình, the Bot Telegram block: paste the token into BOT TOKEN (lấy từ @BotFather) and the id into ID NGƯỜI ĐƯỢC DÙNG, then press lưu. -
Build the bot container once
The bot runs as its own container, so it has to be started once. There is no docker-compose file to edit — the bot reads the two values it just stored from the same database it shares with the app.docker compose --profile telegram up -d --build -
Send /start
Message the bot/start. It answers with the menu.
/start is answered with the menu carrying Reup, Review, Affiliate, Jobs, Status and Trợ giúp. No answer means the container is not running — check docker logs autoreel-telegram.docker logs autoreel-telegram. An empty list would mean anyone who messages it can post to your real accounts.The commands
| Command | What it does |
|---|---|
| /start or /menu | Open the menu. Both answer the same way. |
| /help | The help lines. |
| /reup | Open the card for the reup flow. |
| /review | Open the card for the review flow, including the Recap the film mode. |
| /affiliate | Open the card for the affiliate flow. |
| /cancel | Drop the card you are filling in. |
| /jobs | Ask the app what is in the queue. |
| /status | With nothing after it: ask about the whole machine — app, engine, phone, Facebook. |
| /status [id] | Follow one run by its id. |
| /pages | Ask the app for the Facebook Page list. |
A command that is not in that table gets the menu back rather than silence.
Three of those questions — /jobs, /status, /pages — the bot cannot answer by itself. It asks the app and says that it asked; the real answer arrives a beat later, as an ordinary message.
Following work in progress
/jobs lists the queue in two parts. *Đang chạy* ("running") is the work in hand, and each render task shows the product name with a percentage rather than a string of ids — for example ⏳ AutoReel Engine · Đang dựng video · 40% · Áo thun nam cotton. *Vừa xong* ("just finished") is what is done, by name.
/status <id> follows one run and rewrites itself with each step: read the link → fetch pictures → write the script → render the video → queue it for posting. A message that sits still on one step means that step really is slow.
/status with no id reports whether four things are alive: the app, the engine, the phone and Facebook. An engine line reading Sẵn sàng ("ready") means rendering can start.
failed and is not restarted — re-running it could post twice. A failed run stays failed; do it again by hand.Three commands that can really post
/affiliate, /reup and /review post for real. They are not a preview — except /review in Recap the film mode. That one makes one video and never posts; the video lands in the Video library.
Each flow's card carries a summary saying plainly how many videos it will make and where they will go. Nothing happens until Chạy is pressed — the Chạy ("run") button at the foot of the card is the only thing that starts it, with Huỷ ("cancel") beside it.
The source and the destinations are not remembered between runs: yesterday's link is yesterday's video, and a tick left over from last time is a tick nobody made today. Everything else the bot does remember, so it only has to be typed once.