From 4526c4f8a7a52caf4e77f052f852f0c428dfc2a0 Mon Sep 17 00:00:00 2001 From: pieter Date: Tue, 1 Sep 2015 23:29:01 +0200 Subject: [PATCH] First TeleBot bot bug fix: wrong group chat id comparison (str and int) --- examples/telebot_bot/telebot_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/telebot_bot/telebot_bot.py b/examples/telebot_bot/telebot_bot.py index 0d78dfb..7cf76cb 100644 --- a/examples/telebot_bot/telebot_bot.py +++ b/examples/telebot_bot/telebot_bot.py @@ -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") 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): return chat_id== GROUP_CHAT_ID