Skip to content

Commit 2fe09d1

Browse files
committed
add warning to subscribe to @tonstatus
1 parent d0a2de5 commit 2fe09d1

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

modules/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class Setting:
5454
'useDefaultCustomOverlays': Setting(None, True, 'Participate in default custom overlays node eligible to'),
5555
'defaultCustomOverlaysUrl': Setting(None, 'https://ton-blockchain.github.io/fallback_custom_overlays.json', 'Default custom overlays config url'),
5656
'debug': Setting(None, False, 'Debug mtc console mode. Prints Traceback on errors'),
57+
'subscribe_tg_channel': Setting('validator', False, 'Disables warning about subscribing to the `TON STATUS` channel'),
5758
}
5859

5960

mytonctrl/mytonctrl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,17 @@ def check_vps(local, ton):
467467
color_print(f"Virtualization detected: {data['product_name']}")
468468
#end define
469469

470+
def check_tg_channel(local, ton):
471+
if ton.using_validator() and ton.local.db.get("subscribe_tg_channel") is None:
472+
print_warning(local, "subscribe_tg_channel_warning")
473+
#end difine
474+
470475
def warnings(local, ton):
471476
check_disk_usage(local, ton)
472477
check_sync(local, ton)
473478
check_validator_balance(local, ton)
474479
check_vps(local, ton)
480+
check_tg_channel(local, ton)
475481
#end define
476482

477483
def CheckTonUpdate(local):

mytonctrl/resources/translate.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,10 @@
419419
"ru": "{green}Доступно обновление TON. {red}Пожалуйста, обновите его с помощью команды `upgrade`.{endc}",
420420
"zh_TW": "{green}TON 有可用更新. {red}請使用 `upgrade` 命令進行更新.{endc}"
421421
},
422-
"disk_usage_warning": {
423-
"en": "{red} Disk is almost full, clean the TON database immediately: https://docs.ton.org/participate/nodes/node-maintenance-and-security#database-grooming {endc}",
424-
"ru": "{red} Диск почти заполнен, немедленно очистите базу данных TON: https://docs.ton.org/participate/nodes/node-maintenance-and-security#database-grooming {endc}",
425-
"zh_TW": "{red} 磁盤幾乎滿了,立即清理 TON 數據庫: https://docs.ton.org/participate/nodes/node-maintenance-and-security#database-grooming {endc}"
422+
"subscribe_tg_channel_warning": {
423+
"en": "{red} Make sure you are subscribed to the TON validators channel on Telegram: https://t.me/tonstatus {endc}\nTo disable this warning use command `set subscribe_tg_channel true`",
424+
"ru": "{red} Убедитесь, что вы подписаны на канал валидаторов TON в Telegram: https://t.me/tonstatus {endc}\nЧтобы отключить это предупреждение, используйте команду `set subscribe_tg_channel true`",
425+
"zh_TW": "{red} 確保您已訂閱了 Telegram 上的 TON 驗證者頻道: https://t.me/tonstatus {endc}\n要禁用此警告,請使用命令 `set subscribe_tg_channel true`"
426426
},
427427
"sync_warning": {
428428
"en": "{red} Node is out of sync. The displayed status is incomplete. {endc}",

0 commit comments

Comments
 (0)