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

How to manage Push notifications from pub\sub using JobQueue?

I am using ConversationHandler to manage my boot's states. I also have some timers there, so i am using JobQueue that for. Also i have web application where user can perform some tasks, after tasks complete i whant it (site) to send notification to…
0
votes
2 answers

python-telegram-bot indexing a file library (videos and photos)

i am using python-telegram-bot 8 i am trying to make a database (mysql) indexing all files (videos and photos) that are sent by users in a telegram supergroup to say a warn if someone send a file that already was sent. videos and photos has the…
Roberto Junior
  • 115
  • 1
  • 1
  • 9
0
votes
1 answer

python-telegram-bot 8 not seeing other bots messages

I´m using python-telegram-bot 8 and my bot is not processing messages that are sent by other bots in a group Works OK with other users (not bots) why my bot, don't see other bots messages? def main(): updater = Updater(bot_token) dp =…
Roberto Junior
  • 115
  • 1
  • 1
  • 9
0
votes
1 answer

Twisted Reactor not restarting in scrapy

I'm trying to run a scrapy spider via a Telegram bot using the python-telegram-bot API wrapper. Using the below code, I can successfully execute the spider and forward the scraped results to the bot, but only ONCE since I run the script. When I…
Arion_Miles
  • 163
  • 1
  • 2
  • 13
0
votes
1 answer

auto start telegram bot in code anywhere

i install telegram anti spam python bot on codeanywhere but that bot Turns off every 2 hours. Is there a command to turn the robot back on after turning off?
a. dodss
  • 1
  • 1
0
votes
1 answer

When the command / start is sent to the bot, the bot should delete the stickers sent to the group; but the bot does not work

I am built a telegram bot with the Python-Telegram-Bot framework.I added it to a group and admin the bot in the group. bot codes: from telegram.ext import Updater, MessageHandler, CommandHandler, Filters updater = Updater(token='TOKEN') dispatcher…
Sajjad
  • 41
  • 1
  • 4
  • 13
0
votes
1 answer

Updated time from user in hh mm sec format using telegram bot

I tried to get response time of user replay from the telegram bot API, but it is not working. update.message response time suggests the better way to get time.
isaacalan
  • 73
  • 1
  • 8
0
votes
2 answers

How can a telegram bot change that works only for a specific time in a group?

I'm built a telegram bot for the groups.When the bot is added to the group, it will delete messages containing ads.How can I change the bot to work for only 30 days in each group and then stop it? That means, for example, today's bot is added to…
Sajjad
  • 41
  • 1
  • 4
  • 13
0
votes
1 answer

How to use ChosenInlineResultHandler in Python Telegram Bot

I try use python-telegram-bot I do not understand how to handle InlineKeyboardButton correctly. def start(bot, update): currencies = [currency for currency in API().get_currencies()] keyboard = [[InlineKeyboardButton("{}".format(c),…
0
votes
0 answers

Making a free virtual number (without paying)

I want to create a telegram bot for groups with more than 5000 members. I know that the bots made with Iranian phone numbers in Bot Father do not work in groups with more than 5,000 members, so we need Iranians to use the virtual numbers of…
user8424508
0
votes
1 answer

How to create a telegram bot that only works for 30 days per user and then stops there?

I built a telegram bot with a Python-Telegram-bot module, and now I want to set it up to work only 30 days, that is, when the user sends the /start to the bot, the bot will stop for 30 days.my codes: # -*- coding: utf-8 -*- from telegram.ext import…
Sajjad
  • 41
  • 1
  • 4
  • 13
0
votes
1 answer

The telegram bot should delete Sticker, Gif, and Voice that are sent to the group;but do not delete them

I built a telegram bot with a python-telegram-bot module.I added the bot to the group and got the bot in the admin group.The bot should be delete when Sticker, Gif or Voice are sent to the group;But the bot does not delete them.bot code: from…
Sajjad
  • 41
  • 1
  • 4
  • 13
0
votes
2 answers

getting messages from telegram channels - python

i want to develop a bot in telegram with python. i don't know getUpdates can help me or not? or there is any method for doing it. i want to get information(text,pic,link...) of messages from telegram channels. i don't want to do any function inside…
0
votes
1 answer

Telegram bot - requested address is not valid in its context

I built a telegram bot using python-telegram-bot, I want to connect it to a web hook. When I run it, it gives me an error: Exception in thread updater: Traceback (most recent call last): File "G:\python2.7.9\lib\threading.py", line 810, in…
Sajjad
  • 41
  • 1
  • 4
  • 13
0
votes
1 answer

Telegram webhook seems not to work with python APIs

I'm developing a telegram bot with the help of this API, and I tried to implement it with webhook method, first I tried my bot with getUpdated method and it works like a charm, but when I updated it to webhook, it doesn't seem to work. I implemented…
ganjim
  • 1,234
  • 1
  • 16
  • 30