Token can contain some additional symbols

This commit is contained in:
Egor Guslyancev 2023-11-19 12:53:07 -03:00
parent 7a6411f6b0
commit d1872a85ea
GPG Key ID: D7E709AA465A55F9
1 changed files with 1 additions and 1 deletions

2
bot.py
View File

@ -98,7 +98,7 @@ try:
with open("token", encoding = "utf-8") as fi:
for i in fi:
i = i.strip()
pattern = re.compile("^[\\d]{10}:[\\w\\d]{35}$")
pattern = re.compile("^[\\d]{10}:[\\w\\d\\-\\+\\*]{35}$")
matches = pattern.fullmatch(i) is not None
if matches:
bot = telebot.TeleBot(i, parse_mode = "MarkdownV2")