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
-1
votes
1 answer

Telegram bot is not sending messages

I'm trying to execute this simple telegram bot but I get no output and I don't know what I'm doing wrong. This is the code: from telegram import Update from telegram.ext import Updater, CommandHandler, CallbackContext def hello(update: Update,…
Iker
  • 1
  • 1
-1
votes
1 answer

Eror in python-telegram-bot

I tried to create a bot in telegram with python, but it doesnt work. My code is below: from telegram.ext import Updater, CommandHandler updater = Updater(Token) def start(bot,update) : chat_id = update.message.chat_id …
-1
votes
1 answer

My bot not reponse back after setup my webhook?

I was stuck for a day The bot isn't response back my command /start after setup web hook. I swear it working fine on local with polling method. But not working after setup web hook . I'm using flask + heroku This is my full…
-1
votes
2 answers

Telegram bot api how to schedule a notification?

I've made a bot that gets today football matches and if the user wants he can get a reminder 10 min before a selected match. while current_time != new_hour: now = datetime.now() current_time = now.strftime("%H:%M") #return…
-1
votes
2 answers

Scraping online and last seen recently users from Telegram chats

I want to scrape a Telegram group with Telethon API. But this code scrapes all users in the group. But I want to scrape only online and last seen recently users. How to do it? from telethon.sync import TelegramClient from…
-1
votes
1 answer

telegram bot python authorize user using user_id

I declared an array with permitted user id users_id = ['123213213'] and trying to validate user @bot.message_handler(commands=['authorize']) def start_command(message): if message.from_user.id not in users_id: bot.send_message( …
-1
votes
1 answer

How to break conversation when sending another command

I'm using PyTelegramApi library. My bot has 4 buttons that each do a different action. How can I break the conversation when the user click on "back" button or send another command? For exmple: /start -> click on new post button. Bot: Hi, send…
-1
votes
1 answer

Solved How to make the telegram bot write to your channel?

upd: 09.11.20 SOlVED I've made the telegram bot that working good in single conversations of a groups. However right now I want it to send messages right in my channel. When I'm writing script(after i write straigt to the bot to invoke it by command…
-1
votes
1 answer

Running Telegram Bot Python File forever

I am wondering if it is possible to run a telegram bot python file forever? Possibly without the use of a server. Is there anyway i can do this without having a spare PC to run the file?
Marcus
  • 61
  • 1
  • 9
-1
votes
2 answers

How to get Telegram List of users joining group

How can I get information from telegram about new users joining my group, I want it to record on a spreadsheet of the member name and who he/she invited into the group. Is there a way for me to do this? I try to look at some Telegram API in…
Moon
  • 9
  • 2
-1
votes
1 answer

How to make Separate list for each user?

Using Python telegram bot i created a reminder bot that would get user reminders and store them on a list , and when the users send request to get reminder it would take them from list i thought the Python Telegram Bot Would Automatically make…
Abbos Said
  • 1
  • 1
  • 2
-1
votes
1 answer

How to filter by description of document in Telegram

I have this code: def initiate_sticker_set(update, context): context.bot.send_message(update.message.chat.id, "initiate sticker set") initiate_sticker_set_handler = MessageHandler(Filters.text("hello"),…
ibodi
  • 1,543
  • 3
  • 21
  • 40
-1
votes
1 answer

Create sticker set from a sent image

I am trying to create a sticker set using images that are sent by a user to my bot. I have the following code: MY_USER_ID = "MyFakeUserId" MY_TOKEN = "MyFakeToken" import logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s -…
ibodi
  • 1,543
  • 3
  • 21
  • 40
-1
votes
1 answer

Send result query Oracle to telegram bot in python

Folks, Does anyone have any examples of executing an oracle query and sending the message via telegram bot in python?
-1
votes
2 answers

How can I send message to user, knowing his username?

I'm use python-telegram-bot for sending message to users (in private messages). In the documentation wrote, that bot can send message to user, knowing his channel_id or username. But, by chat_id message is sending, but by username I get error…
user10898133