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
0
votes
1 answer
Leaving group channels as a bot
I made a telegram bot using telepot, one of the issues I have is that groups can still invite and make the bot join their channels, even with /setjoingroups disabled. Is there a way to list these groups and leave them from the code or from…

alioh
- 59
- 5
0
votes
1 answer
Global name is not defined telepot
When trying to sendMessage it tells me the chat id is not defined. I am able to answerCallbackQuery because it needs query ID not chat.
If I try to enter in 'chat_id' in the DEF on callback query area it throws up more errors
Where exactly in the…

ible
- 55
- 6
0
votes
1 answer
TELEPOT Keep getting error 400 when chat not found when trying to call back query to send a message
This is my code, my conf.py file is just the API token which i have double checked and the timezone.
I am trying to get my bot to respond to a button click by sending a message or a photo. I understand i need to use the sendPhoto function but i dont…

ible
- 55
- 6
0
votes
0 answers
sendVideo gives error 'Bad Request: failed to get HTTP URL content'
I have a short url https://da.gd/D8GwGt which is a download link for a video. When I try to send this video using bot.sendVideo(chat_id, https://da.gd/D8GwGt, supports_streaming=True) it gives out an error as
telepot.exception.TelegramError: ('Bad…

Sumit Jaiswal
- 216
- 1
- 4
- 17
0
votes
1 answer
How to solve "No module named 'telepot"' error in Mac
Hello everybody I'm trying to run the simplest code of tutorial about telepot in python but I keep getting this message
ModuleNotFoundError: No module named 'telepot'
My code is very basic
import telepot
bot =…

Mattia Kristo
- 1
- 1
0
votes
1 answer
Send a photo from php url in telegram bot
I'm trying to send a photo with a telegram bot through sendPhoto method (https://core.telegram.org/bots/api#sendphoto) with telepot api, but it only accepts image urls with .jpg, .jpeg .gif, .png, .tif or .bmp and the photo I want to use is…

Mat13
- 1
- 2
0
votes
1 answer
telegram editMessageMedia alternative for telepot
python's telepot library is no longer being maintained and updated
in new telegram bot api update editMessageMedia was added
how to use it with http GET/POST request ?
( requests library or any other lib )

Khalil Abbas
- 110
- 2
- 7
0
votes
0 answers
an error given while trying to use telepot in PythonAnywhere
I'm trying to upload a simple Telegram bot code to PythonAnywhere, which uses the telepot library.
I installed the library in the bash console but when I tried to run the program, I was given the following error:
ModuleNotFoundError: No module named…

nit17
- 47
- 5
0
votes
1 answer
Run python script in an range of hours
can i run my script in an range of hours?
For example: I would like to execute my script every day from 6am to 12 pm. At 12:01 pm i would like to kill the process
Thanks
PS: My script is hosted on heroku

Frank
- 1
0
votes
1 answer
How to get users's location and Venue in a bot telegram by telepot
I'm creating a bot with Python telepot for the bus itineraries. I don't understand how to manage commands, can anyone explain to me how I can get the position (street name) of a user who uses my bot?
import json
import time
from pprint import…

Abdul Gandal
- 97
- 1
- 7
0
votes
1 answer
how do i get location in telegram telepot?
hi i'd like my python chatbot to be able to get users location.
I cannot find code for that -- can u help ?
def testbot_basic():
def handle(msg):
content_type, chat_type, chat_id = telepot.glance(msg)
if content_type == 'text':
…

Fabio Bertellotti
- 43
- 1
- 6
0
votes
1 answer
Telepot lock reply_keyboard python
I have a problem.
I created a telegram bot under python3 with telepot and I use a custom keyboard.
the problem is that when i press a button, the custom keyboard is hidden by the phone keypad.
is it possible to temporarily lock the custom keyboard…

ProfesseurIssou
- 16
- 2
0
votes
0 answers
how to access a spreadsheets with python
so, I found this google spreadsheet and i really want to use it in combination with a telegram (TELEPOT) bot, to receive information of the weapon with a query given by the user, like:
elif text.startswith('/wiki'):
…

Vaykor MIP
- 129
- 1
- 8
0
votes
0 answers
Is there any fast and easy way to store the state of a (flask + webhook) Telegram bot?
I'm writing a Telegram bot in a Flask web app (with webhook and telepot), and I've been searching for an easy way of having just a little of data persistency (storing a bunch of variables so that the bot remembers which level of a text-based puzzle…

Rusca8
- 533
- 4
- 11
0
votes
1 answer
Is there a way to directly send an OpenCV frame using telepot?
I am doing an OpenCV project and I cant seem to find a way to send the frames using telepot module to my telegram. I've already setup the telegram bot.
------------Opencv processing------
cv2.imshow('Object detector',…

Amirul Iqram
- 313
- 1
- 3
- 13