Skip to content

Commit 2777801

Browse files
committed
bugfix
1 parent 0a0acb1 commit 2777801

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

modules/alert_bot.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def __init__(self, ton, local, *args, **kwargs):
8383
self.validator_module = None
8484
self.inited = False
8585
self.hostname = None
86-
self.token = self.ton.local.db.get("BotToken")
87-
self.chat_id = self.ton.local.db.get("ChatId")
88-
self.last_db_check = None
86+
self.token = None
87+
self.chat_id = None
88+
self.last_db_check = 0
8989

9090
def send_message(self, text: str):
9191
if self.token is None:
@@ -133,6 +133,8 @@ def set_global_vars(self):
133133
def init(self):
134134
if not self.ton.get_mode_value('alert-bot'):
135135
return
136+
self.token = self.ton.local.db.get("BotToken")
137+
self.chat_id = self.ton.local.db.get("ChatId")
136138
if self.token is None or self.chat_id is None:
137139
raise Exception("BotToken or ChatId is not set")
138140
from modules.validator import ValidatorModule

0 commit comments

Comments
 (0)