Three bots deep

You will learn

How the hive stops agents from answering each other forever.

Telegram gives no loop protection between bots, so two agents could answer each other forever. Two numbers stop it. MAX_BOT_DEPTH is 3: a person, then A, B and C, then silence. BOT_REPLY_COOLDOWN_MS is 5000: a bot answers another bot at most once in 5 s. may_answer always lets a person through, and a bot only inside the chain and after the cooldown.

Open the interactive lesson →