Questions tagged [python-telegram-bot]

This is a Python library that wraps around the Telegram Bot API. Note that this is not a general tag for "Telegram bots written with Python", but only for question about this particular library.

This is a library that wraps around the bot HTTP API. It is compatible with only (please check the PyPi/GitHub page for detailed info).

Telegram Bot API

The Telegram Bot API is an HTTP-based interface created for developers keen on building bots for Telegram.

1454 questions
0
votes
1 answer

A python coded telegram bot for reading messages

I need to write a telegram bot with python as my python-class project. I've found out that I can generally do it bu telegram.ext lib. but I need help to know which classes and method can hand me for reading messages and bio from different telegram…
ghafa
  • 1
  • 1
  • 1
0
votes
1 answer

How do I acknowledge that message has been received in AWS Lamba for a Telegram Bot

I have a Telegram bot which I run on AWS Lamdba. I use webhooks (not getUpdates) I learnt that if you don't acknowledge that message has received, then Telegram keeps sending it back. So how do I do it? I am using this library - Python Telegram Bot
avi
  • 9,292
  • 11
  • 47
  • 84
0
votes
0 answers

Python Telegram Bot check if all updates processed

I'm using python-telegram-bot for one simple bot. Is there any way to make sure all updates that i've got previously are processed before requesting new ones?
bnopne
  • 95
  • 7
0
votes
1 answer

Invalid token error in Telegram Bot API

I'm new to telegram bot api. I installed telegrom package and started to run my first code. but I cannot run my first code ! Can anyone know why this is happening? what should I do ? Thank you Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016,…
Bank
  • 67
  • 1
  • 8
0
votes
1 answer

Valid processing of concurrent replies in Telegram bot

I have a question-answer gameplay in my telegram bot and I have an issue in concurrent replies: bot: question_1 player_1: answer_1_to_question_1 bot: answer correct, question_2 player_2: delayed answer to question_1 <--- problem bot: invalid answer…
dbf
  • 6,399
  • 2
  • 38
  • 65
0
votes
0 answers

Alarm enable/disable not changing in class

I'm trying to enable/disable a class variable. I can see the change in my function when I call the disable function. But outside of the function, it still reads as enabled. alarm.py Class Alarm: def __init__(self): self.alarm_enabled =…
Keva161
  • 2,623
  • 9
  • 44
  • 68
0
votes
2 answers

Telegram bot send document

I created a bot to Telegram in python that allows you to send any file, but unfortunately allows me to send a maximum of 50 MB (I integrated the library telepot) I wanted to ask if you can take advantage of the limit which offers telegram, or 1.5…
Style
  • 1
  • 1
0
votes
1 answer

message text not returned in getUpdates telegram bot

I am using: https://api.telegram.org/[bot_id]/getUpdates to retrieve the recent updates. It returns a message object, however it does not include the "text" field of the message. "message": { "message_id": 5, "from": { …
0
votes
2 answers

Uptime in Telegram bot in Python

I'm playing with a Telegram bot sitting on my Raspberry Pi, all works good but I'm trying to show the uptime of the rpi with the command /uptime without success, I tried with: elif command == '/uptime': bot.sendMessage(chat_id,…
fdicarlo
  • 450
  • 1
  • 5
  • 10
0
votes
1 answer

Using JobQueue to continuously refresh a message

I'm building a Telegram bot that uses ConversationHandler to prompt the user for a few parameters and settings about how the bot should behave. This information is stored in some global variables since it needs to be available and editable by…
user2747949
  • 163
  • 1
  • 6
  • 13
0
votes
1 answer

Add custom request mapping in python-telegram-bot embedded HTTPServer.HTTPServer

i have just rewritten my telegram bot from pyTelegramBotAPI with python-telegram-bot. There was an idea to have a monitoring url available publicly that we could ping once in a while with some app to see if the bot is still running (internally, it…
d56
  • 825
  • 1
  • 9
  • 26
0
votes
1 answer

Play Audio From Url using Python,(Telegram-bot)

I have tried many libraries,they didn't work for me:( import pyglet url=https://api.telegram.org/file/TOKEN/GENERATED_FILE_PATH pyglet.resource.path = [r'url'] pyglet.resource.reindex() music =…
0
votes
1 answer

How can I get data from Goodreads and use it in Telegram Bot API

I've come up with an idea of writing an inline telegram bot and use a Goodreads API for this. But I don't know how to properly extract a book info from Goodreads and put it into special fields in bot api request. I will be so much grateful for…
0
votes
1 answer

Get a message my bot wrote

I want my bot to edit a message it wrote by appending some text to the original message. I don't want to store the message I sent so I would like to save the message identifier only and use it to get the message, append the text and edit the message…
Damaru
  • 155
  • 1
  • 8
0
votes
1 answer

How do I programmatically create a vertical custom keyboard layout with python using the telegram bot api?

I'm trying to create a card-based game bot using the telepot api wrapper for telegram, but I can't figure out how to make it use a vertical layout instead of a horizontal layout sample code: keyboard = [] for card in…
James Reed
  • 75
  • 1
  • 1
  • 9