Unmatched ( resolved

This commit is contained in:
Egor Guslyancev 2023-12-18 09:31:28 -03:00
parent b5497fe49f
commit f258e4c744
GPG Key ID: D7E709AA465A55F9
1 changed files with 4 additions and 5 deletions

9
bot.py
View File

@ -20,8 +20,6 @@ db = db_classes.PickleDB(".db")
db.load()
CURRENT_VERSION = "v1.0rc8"
VERSION = db.read("about.version", CURRENT_VERSION)
db.write("about.updatedfrom", VERSION)
db.write("about.version", CURRENT_VERSION)
db.write("about.author", "electromagneticcyclone")
db.write("about.tester", "angelbeautifull")
db.write(
@ -33,9 +31,8 @@ if (db.read("about.host") is None) and __debug__:
db.write("about.host", stdin.readline()[:-1])
bot = telebot.TeleBot(
cr.read(f"tokens.{"devel" if __debug__ else "prod"}"), parse_mode="MarkdownV2"
)
MODE = "devel" if __debug__ else "prod"
bot = telebot.TeleBot(cr.read(f"tokens.{MODE}"), parse_mode="MarkdownV2")
def get_time(forum: int) -> dt.datetime:
@ -1459,6 +1456,8 @@ for thread in threads:
thread.daemon = True
thread.start()
db.write("about.updatedfrom", VERSION)
db.write("about.version", CURRENT_VERSION)
if VERSION != CURRENT_VERSION:
for FORUM in db.read("").keys():
try: