11---
22title : Telegram Bot
33sidebar_position : 1
4- description : using the Ratio1 Telegram Bot
4+ description : Using the Ratio1 Telegram Bot
55---
66
77# Telegram Bot
88
9- The Ratio1 Telegram Bot is a lightweight monitoring interface for node operators.
10- It helps track wallet-linked nodes and receive status updates directly in Telegram, without opening dashboards or running manual checks each time.
9+ The Ratio1 Telegram Bot is a lightweight monitoring interface for node
10+ operators. It helps track wallet-linked nodes and receive status updates
11+ directly in Telegram, without opening dashboards or running manual checks each
12+ time.
1113
1214## What it is and who it is for
1315
@@ -25,7 +27,8 @@ Typical goals:
2527
2628## Quick Start
2729
28- 1 . Open Telegram and start a private conversation with the [ Ratio1 Telegram Bot] ( https://t.me/Ratio1ai_bot ) .
30+ 1 . Open Telegram and start a private conversation with the
31+ [ Ratio1 Telegram Bot] ( https://t.me/Ratio1ai_bot ) .
29322 . Run:
3033
3134``` text
@@ -86,7 +89,8 @@ Use this when a wallet is no longer relevant for alerts.
8689
8790## When you receive messages
8891
89- - You receive a message when a node from a watched wallet is detected as offline.
92+ - You receive a message when a node from a watched wallet is detected as
93+ offline.
9094- You receive another message when that node comes back online.
9195
9296Typical messages:
@@ -101,15 +105,20 @@ Typical messages:
101105
102106## For Developers
103107
104- This bot also serves as a practical open-source example of how to build Telegram bots on Ratio1.
108+ This bot also serves as a practical open-source example of how to build Telegram
109+ bots on Ratio1.
105110
106111Main pieces:
107112
108- - ` reply(...) ` handles Telegram commands such as ` /watch ` , ` /watchlist ` , ` /unwatch ` , and ` /nodes ` .
109- - ` loop_processing(...) ` runs periodically to detect offline or recovered nodes and send notifications.
110- - ` create_telegram_simple_bot(...) ` deploys the bot pipeline on a Ratio1 node with both handlers attached.
113+ - ` reply(...) ` handles Telegram commands such as ` /watch ` , ` /watchlist ` ,
114+ ` /unwatch ` , and ` /nodes ` .
115+ - ` loop_processing(...) ` runs periodically to detect offline or recovered nodes
116+ and send notifications.
117+ - ` create_telegram_simple_bot(...) ` deploys the bot pipeline on a Ratio1 node
118+ with both handlers attached.
111119
112- In practice, command handling and periodic monitoring are separated, which keeps the bot responsive while still sending asynchronous alerts.
120+ In practice, command handling and periodic monitoring are separated, which keeps
121+ the bot responsive while still sending asynchronous alerts.
113122
114123Tutorial code:
115124[ github.com/Ratio1/ratio1_sdk/blob/main/tutorials/ex21_telegram_community_bot.py] ( https://github.com/Ratio1/ratio1_sdk/blob/main/tutorials/ex21_telegram_community_bot.py )
0 commit comments