1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

First TeleBot bot bug fix: wrong group chat id comparison (str and int)

This commit is contained in:
pieter 2015-09-01 23:29:01 +02:00
parent efc98c084f
commit 4526c4f8a7

View File

@ -31,7 +31,7 @@ if "TELEBOT_BOT_TOKEN" not in os.environ or "GROUP_CHAT_ID" not in os.environ:
raise AssertionError("Please configure TELEBOT_BOT_TOKEN and GROUP_CHAT_ID as environment variables") raise AssertionError("Please configure TELEBOT_BOT_TOKEN and GROUP_CHAT_ID as environment variables")
bot = telebot.AsyncTeleBot(os.environ["TELEBOT_BOT_TOKEN"]) bot = telebot.AsyncTeleBot(os.environ["TELEBOT_BOT_TOKEN"])
GROUP_CHAT_ID = os.environ["GROUP_CHAT_ID"]\ GROUP_CHAT_ID = int(os.environ["GROUP_CHAT_ID"])
def is_api_group(chat_id): def is_api_group(chat_id):
return chat_id== GROUP_CHAT_ID return chat_id== GROUP_CHAT_ID