skip to Main Content

How can I reply to a message after a command in Telebot API in python – Telegram API

I have this code.. import telebot #telegram API api_key = os.environ['Tele_API_key'] bot = telebot.TeleBot(api_key) @bot.message_handler(commands=['start']) def help_command(message): bot.send_message(chat.id,"send a message") @bot.message_handler(func = lambda msg: msg.text is not None and '/' not in msg.text) if message.text == "Hi": bot.send_message(chat.id,"Hello!") It sends…

VIEW QUESTION

How to open URL's using telegraf JS markup inline keyboard in telegram in app browser? – Telegram API

Code Snippet: ctx.reply( `Hi! ${ctx.from.first_name} 👋 n n Shall we start? 👇 `, Markup.inlineKeyboard( [ Markup.button.url( "Covid-19 🇮🇳 IN", "https://www.covid19india.org/" ), Markup.button.url("WHO 🌎", "https://covid19.who.int/"), ], { columns: 2 } ) ); This is throwing a 400 Bad request URL exception.…

VIEW QUESTION

Telegram Bot URL returns 404 – Telegram API

I am using Python for sending message to a telegram group, the URL returns 404. Below is the code: import requests from config import API, CHAT_ID # telegram url url = "https://api.telegram.org/bot{}".format(API) print(url) def send_mess(text): params = {'chat_id': CHAT_ID, 'text':…

VIEW QUESTION
Back To Top
Search