We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ec98d8 commit 74d97b0Copy full SHA for 74d97b0
1 file changed
tg_bot/__main__.py
@@ -462,9 +462,11 @@ def main():
462
# dispatcher.add_error_handler(error_callback)
463
464
# Restarting bot message
465
- dispatcher.bot.sendMessage(chat_id=int(DEFAULT_CHAT_ID),
466
- text="Sistema *riavviato*.\nVersione: {}".format(str(VERSION)),
467
- parse_mode=ParseMode.MARKDOWN)
+
+ if DEFAULT_CHAT_ID:
+ dispatcher.bot.sendMessage(chat_id=int(DEFAULT_CHAT_ID),
468
+ text="Sistema *riavviato*.\nVersione: {}".format(str(VERSION)),
469
+ parse_mode=ParseMode.MARKDOWN)
470
471
# add antiflood processor
472
Dispatcher.process_update = process_update
0 commit comments