Questions tagged [telegram-bot]

The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram which is an instant-messaging app with documented API. Use this tag if you're writing a telegram bot and have a specific question regarding the Bot API.

Available methods

  • getMe
  • sendMessage
  • forwardMessage
  • sendPhoto
  • sendAudio
  • sendDocument
  • sendSticker
  • sendVideo
  • sendVideoNote
  • sendVoice
  • sendLocation
  • sendVenue
  • sendContact
  • sendChatAction
  • getUserProfilePhotos
  • getUpdates
  • setWebhook
  • removeWebhook
  • getFile

Links:

4905 questions
1
vote
2 answers

bot.polling() issue with pytelegramapi

I was just doing a simple lines of code and it gives a lot of issues just for using bot.polling(). import telebot token = '19*******:********-********-lmY' bot = telebot.TeleBot(token) @bot.message_handler(commands=['greet']) def…
1
vote
1 answer

make a telegram bot - ClassNotFoundException: org.apache.http.client.HttpClient

I have a big problem : I want to make a very simple Telegram Bot . and I've searched a lot of websites and I found this code but I got this error when running following code : I tried in Eclipse but the error is same and it's about…
hamid
  • 47
  • 5
1
vote
1 answer

Telegram API - How to solve create new application error?

I found a post in Stackoverflow, but it's unable to resolve my issue. enter link description here Prooblem screenshot: enter image description here
Naruto
  • 11
  • 2
1
vote
1 answer

H14 in heroku web

Hello I was just trying to use web and worker based bot I mean something like main.py with # telegram bot from pyrogram import Client,filters Bot = Client(api_id,api_hash,bottoken) @Client.on_message(filters.command("start") async def…
Vishal R
  • 11
  • 2
1
vote
4 answers

'Telebot' has no attribute 'types'

Well, I've tried to run another's person telegram bot on my computer, but got a mistake that: Traceback (most recent call last): File "C:\Users\Dmitriy\PycharmProjects\pythonProject\Main.py", line 10, in keyboard =…
dim0ntei
  • 39
  • 1
  • 8
1
vote
0 answers

Convert Whatsapp message formatting to Telegram message formatting

I'm looking to write the perfect code for translating messages formatted for WhatsApp into messages formatted for Telegram. Whatsapp uses * and _ for bold and italic (but if you dive into it you'll discover that the parsing rules are quite…
1
vote
0 answers

Bot with TelegramApi javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException

Hi I'm building a telegram bot that works, but whenever I try it on my laptop company it throws me this error: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find…
1
vote
1 answer

Cannot access user_data when using job queue

I have a function that I need to be able to both execute by sending a command and execute automatically using a job queue. And in that function I need to have access to user_data to store data that is specific to each user. Now the problem is that…
Amir Shabani
  • 3,857
  • 6
  • 30
  • 67
1
vote
1 answer

Python Telegram API raises unhelpful error when trying to edit message media

I'm programming a telegram bot in python that, on command, starts sending a photo of a window on my computer to the chat every few seconds. Of course I don't want the chat to get spammed with photos so instead I want to go back and edit the first…
1
vote
1 answer

Python invalid literal for int() with base 10: 'Start'

df = pd.read_excel('StartAdding.xlsx') startfrom,endto = df.loc[df['Session'].str.contains(session_name, case=False),['Start','End']].squeeze() n = 0 for user in users: if (int(startfrom) <= int(user['srno'])) and (int(user['srno']) <=…
JiaHao Wang
  • 101
  • 3
  • 13
1
vote
2 answers

TimedOut in python-telegram-bot but message is sent

I've got following error while trying to send a message to a specific telegram channel: TimedOut: Timed out The read operation timed out the method which I used from python-telegram-bot was send_message. Although my bot got this error but it still…
Ashkan Khademian
  • 307
  • 3
  • 12
1
vote
0 answers

Markdown2 of Telegram bot isn't working with python

I'd like to send the message using telegram bot using python. It contains a password and I want to copy and paste it automatically if I push it. I use MarkDown parse_mode as below. bot.sendMessage(parameters.chat_id, text = "pw: "+"```"+ password+…
vantabeam
  • 45
  • 1
  • 6
1
vote
0 answers

Import "telegram" could not be resolved (on MacOS)

I try to install pyhon-telegram-bot on macOS. python -i Python 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. But…
1
vote
1 answer

How do I automate telegram bot to use another bot and retrieve information from it?

How do I use a public bot and retrieve information from it using my bot TELEGRAM? So I made a bot using BotFather, I'm going to add many functions to it, but one of them is that I want it to use another bot. There is a bot…
mad life
  • 25
  • 3
1
vote
1 answer

Telegram bot API method answerCallbackQuery does not show alert

I'm trying to show alert like this https://i.stack.imgur.com/0lSAk.png My test code looks like this $url = "https://api.telegram.org/botTOKEN/answerCallbackQuery"; $response = file_get_contents($url."?callback_query_id=". $callback_query_id…
maximw
  • 21
  • 5