skip to Main Content

Telegram permitted callback_data size less than file_id size – Telegram API

I need to resend file id in callback data like that: cd1 = 'publish {}'.format(new_file_id) cd2 = 'delayed 1 {} *'.format(new_file_id) ... markup = types.InlineKeyboardMarkup(1) btn1 = types.InlineKeyboardButton(text='Publish', callback_data=cd1) btn2 = types.InlineKeyboardButton(text='Delayed publication', callback_data=cd2) markup.add(btn1, btn2) bot.edit_message_reply_markup(message.chat.id, msg.message_id, reply_markup=markup) But…

VIEW QUESTION

I'm writing a telegram bot with python – Telegram API

I want to write a telegram bot via Python, but it doesn't work. import telebot bot = telebot.TeleBot("my_token") @bot.message_handler(content_types=['text']) def sending(message): bot.send_message(message.chat.id, message.text) # RUN bot.polling(non_stop=True) Returns to me the following problem. AttributeError: 'TeleBot' object has no attribute 'message_handler'

VIEW QUESTION
Back To Top
Search