telepot is a python library to access the Telegram Bot API and work with it via python script or console
Questions tagged [telepot]
109 questions
1
vote
1 answer
reply to call back query in telepot
I have created inline keyboard and am trying to answer the callback query with a message. The terminal is recieving the query but i do not know the correct syntax for replying to it with messages and ultimately photos and other things.
I sometimes…

ible
- 55
- 6
1
vote
1 answer
Python Telepot bot inline keybard
I am building a bot in Python using Telepot. I am able to have it respond to commands but when i implement an inline keyboard i do not know how to call on them. I know it must be callbackquery but i cannot find how to implement it.
Any help would be…

ible
- 55
- 6
1
vote
0 answers
Running a cron scheduler within a running thread
I'm writing a telegram bot and I want to schedule it to send an automated message every day at a specific timing, cron style. I am using apscheduler to do it but I could not get the cron function to work. The interval scheduling works fine but it is…

Nicopii
- 31
- 4
1
vote
0 answers
telepot allowed users/chat ID
I'm building a telepot telegram bot on python 3.
However, I want it to be a closed bot. I'm trying to find in the documentation of telepot if there is a way to allow certain users based on there chat ID.
Does anyone know the correct syntax for…

Neptune_01
- 11
- 3
1
vote
0 answers
Telegram Bots with privacy set to disabled should be able to read the last 100 messages from a group - how to implement that in my bot?
So, I have a bot and set Privacy to disabled from @botfather, therefore the bot can access the group's messages. When I try to add it to groups, Telegram sends me a notification that the bot, once added to the group, will be able to access the last…

Trader Jane
- 11
- 1
1
vote
1 answer
Can't download files, PermissionError: [Errno 13] Permission denied: 'C:\\Users\\***\\Desktop' with telepot
i'm trying to download some files with a telegram bot using telepot, but when I try to download it, it gives me this error:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\***\\Desktop'
This is the current code:
def…

SAL
- 547
- 2
- 8
- 25
1
vote
1 answer
Telegram Bot how to use the sendDocument
i can't send *.txt file which is located in the app directory:
i have file in /app and i want to send it with sendDocument method,
telepot lib case:
file = open('report.txt',…

Vadim
- 402
- 6
- 15
1
vote
0 answers
How to deactivate a telepot function using Python
I have a problem with python. I'm creating a telegram bot that returns the bus stop times of some cities, using a library called Telepot (you can find the documentation on google).
The intention of the bot is to ask the city of departure, the…

Abdul Gandal
- 97
- 1
- 7
1
vote
1 answer
Why does telepot send two message instead one?
i have a problem, when telepot sends the second message (after pressing the 'reply_markup=keyboard_selection'), telepot sends also the first message 'bot.sendMessage(chat_id, text = "Cosa desideri fare?", reply_markup=keyboard_selection)'
import…

Abdul Gandal
- 97
- 1
- 7
1
vote
2 answers
Json in python loop
I'm a total beginner, I have a question: I'm going to create a telegram bot using botogram, I would like to insert my list's element in a JSON code by python loop. In this case I would like to create buttons with New York, LA, and Washington,…

Abdul Gandal
- 97
- 1
- 7
1
vote
1 answer
Telepot MessageLoop: How to stop run_as_thread?
checking incoming messages from Telegram works pretty well with
MessageLoop(bot, handle).run_as_thread()
But how can stop this thread from running? I tried join(), but with no success!
user5052520
1
vote
1 answer
bot.sendAudio and bot.sendPhoto methods in telepot return { 'error code' : 400 , 'Bad Request: wrong HTTP URL specified'}
I am using the
telepot.Bot(bot_id).sendAudio(chat_id, file_url)
method, is supposed to send the file, but it returns
Traceback (most recent call last):
File…

Ram Prakash
- 13
- 1
- 3
1
vote
0 answers
from tensorflow.lite.python.interpreter import Interpreter prevents telepot
Good morning,
i am using tensorflow lite and i also wanted to use telepot.
I also installed the Coral USB accelerator, but I don't think it depends on him, also because it is independent of whether or not to add --edgetpu to the end of the program…

Gianfranco
- 11
- 1
1
vote
1 answer
Having a Telepot Bot run in its own Thread
I wrote a telegram bot in python using the telepot library. The bot itself is working. Since I also have some other stuff I need to do periodically while running the bot (namely writing stuff in logs), I want the bot to run in its own thread.
The…

Lithimlin
- 542
- 1
- 6
- 24
1
vote
1 answer
style inline keyboard in telepot
can I put the inline keyboard buttons on multiple lines with telepot?
if I can do it, how can I do it?
I tried this example to learn how to use the InlineKeyboard, but i didn't find other documentation about inlline keyboard in telepot (except for…

gabrielesilinic
- 36
- 1
- 6