SHIPIT by Dzhura · Telegram

Where the bot lives and why it is silent

Guide 6 of 6 · reference
Overview · Why Telegram, and why this one · Kinds of bots and what you can do yourself · Your first bot: from an idea to /start · Reminders and automations · Talking to an agent in Telegram · Where the bot lives and why it is silent

Telegram does not start your bot. A bot is a program, and it answers only while it is running. If it is switched off, messages wait and the bot stays silent.

How a bot receives messages

Telegram holds messages for a bot until it picks them up, but no longer than 24 hours. After that they disappear. Usually a bot built by the builder asks Telegram on its own, regularly, whether anything is new. So it needs no public address, but it does need a process that does not stop.

Where to run it

WhereProsConsWhen to choose
Your MacFree and simple. You see the process yourself.The Mac must be on, awake and online.A test bot, an agent bot for yourself, the first days.
A server or hostingWorks around the clock, even with your computer off.Harder to set up, may cost money.A bot customers rely on.
Google Apps ScriptLives at Google, no server, runs on a schedule.Fits automations, not a bot with a menu.Calendar reminders, emails, summaries.

At the end the agent compares the two options itself and lays out the simplest free one step by step. Ask it to do that if it has not yet.

What happens when the bot is off

The bot is silent: what to check

In order
  1. Is the bot running? The terminal where it runs is open and shows no errors. If not, start it again (the command is in the README).
  2. Is the Mac awake and online? A switched-off screen is fine, but Mac sleep stops the bot.
  3. Did you press Start? Until a person opens the bot and presses Start, the bot cannot write to them.
  4. Is the token right? If you generated a new token in @BotFather, the old one stopped working. Update it in .env.
  5. Is the bot running twice? If the same bot works on the Mac and on a server, they get in each other’s way. Keep one.
  6. The bot does not see messages in a group? By default a bot in a group sees only commands addressed to it and replies to its messages (privacy mode). The /setprivacy command in @BotFather changes that, and then the bot must be added to the group again. Another option: make it a group administrator.
  7. The bot does not answer under heavy traffic? There are limits: about one message per second to a single chat and 20 per minute in a group. If you exceed them, Telegram answers with error 429 and the bot cannot write for a while.

Tell the agent

If you would rather not check yourself, open the bot’s folder and write to the agent:

The Telegram bot is not answering. Check whether it is running, read the log and tell me in plain words what is wrong and what to do.

The agent will look at the process and the log and suggest what to fix.

← Talking to an agent in TelegramOpen the builder →