skip to Main Content

Telegram bot – sendMessage text – Telegram API

I have 2 problems with programming telegram bot by PHP. problem: please, When I try send text with more lines by using API of telegram. By this code: <?php $update = file_get_contents('php://input'); $update = json_decode($update, true); $chatId= $update["message"]["from"]["id"]?$update["message"]["from"]["id"]:null; $mess= "here…

VIEW QUESTION

'TeleBot' object has no attribute 'message_handler' – Telegram API

When I run the code below the following error message is displayed: 'TeleBot' object has no attribute 'message_handler'. import telebot from telebot import types keyboard1 = telebot.types.ReplyKeyboardMarkup() keyboard1.row('Ok', 'Bye') bot = telebot.TeleBot('API') @bot.message_handler(commands=['start']) def start_message(message): bot.send_message(message.chat.id, 'Hi what do you…

VIEW QUESTION
Back To Top
Search