Код
@bot.message_handler(commands=['start'])
def start(message):
time.sleep(5)
user_id = message.chat.id
my_channel_id = -1001722012654
statuss = ['creator', 'administrator', 'member']
for i in statuss:
if i == bot.get_chat_member(chat_id=my_channel_id, user_id=message.from_user.id).status:
bot.send_message(message.chat.id, 'Привет')
break
else:
markup = types.InlineKeyboardMarkup()
butto51 = types.InlineKeyboardButton("Подписаться", url='https://')
buttn552 = types.InlineKeyboardButton("Подписаться", url='https://')
markup.add(button51, button552)
bot.send_message(message.chat.id, "После того как подписался, напиши /start", reply_markup=markup)
UnboundLocalError: local variable 'markup' referenced before assignment