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

Syntax error when trying to send message via telegram bot

Syntax Error I'm trying to make a Raspberry Pi Project with Motion sensor which would send me a telegram message via a bot. "Room is Quiet now..." " Motion detected after 4.81 seconds" I found a reference at…
-2
votes
1 answer

How could I connect database and print its contents in a bot message?

So, I'm trying to make a bot in Telegram (training for future assignments). I'm using pyTelegramBotAPI and sqlite3, and I've got a question in process. I have created a database (example.db) and an inline button, and now I need to connect this…
-2
votes
4 answers

Telegram Bot, answer in private chat

I'm setting up a Telegram Bot, everything works fine but now i would like the bot to answer in private chat for a specific command which was asked in a group. I used Python 3.x. How can I get the Chat ID of the Private Chat between the Bot and the…
-2
votes
2 answers

python telegram bot Post an image file from disk

Result after google [see Post an image file from disk] In[2]: from telegram import Bot In[3]: bot = Bot(token) In[4]: update = bot.get_updates()[0] In[5]: update Out[5]: In[6]: chat_id =…
-2
votes
1 answer

elif statement combined with "and" or "or" not working

I'm coding this telegram bot for my clan. The bot should send a reply based on a few words in the text msg. Suppose I type a text in the group containing the words "Thalia" and "love" and I want the bot to respond. The following works. elif…
-3
votes
1 answer

Telegram Bot joins count

How to get the number of joins in a private channel by the link generated by the bot earlier? I want my bot to be able to get the count of joins by the link or to handle joins by links generated by the bot earlier I will be grateful for the solution
-3
votes
1 answer

Python-telegram-bot not returning expected values

I've written a Python code to get a set of NFT prices from opensea's API and return it's total USD value below: # Downgraded to python-telegram-bot 13.7 : pip install python-telegram-bot==13.7 # Set your bot token here. bot_token = '' # Import…
spidermarn
  • 959
  • 1
  • 10
  • 18
-3
votes
1 answer

How To Obtain Username/chatname of a telegram group With Python-Telegram-Bot?

I'm Creating A Telegram Bot Using Python-Telegram-Bot I need to know the group username or chatname so that I can code such a way to my bot only work in my group. How do I get a group username or chatname using python? I just do like this let's say…
happy
  • 1
  • 1
-3
votes
2 answers

How could I create a telegram bot is always running

I created my telegram bot, and it's running successfully, but I need to keep it running till I closed my PC
-3
votes
1 answer

Telegram bot that sends messages in assigned time every day

I'm trying to build a Telegram bot that enables to send messages 'in assigned time or date' and 'every day' Trying to look for a good example but failed to find one. Because majority are related to crawling thing but mine isn't something to do with…
hyunseo
  • 55
  • 1
  • 5
-3
votes
2 answers

Database python telegram bot MySQL

How I make two parametres for check database info = db.execute(f"SELECT * FROM 'storage_users' WHERE status = ? balance = ?", [status, balance]) Two WHERE parametres
-3
votes
1 answer

How to capture referrer URL on Telegram channel - group using Python - Bot?

I want to perform some automation on a telegram channel and/or group using bot, one of the main features I need to use is capturing the referring URL and make some conditions based on that (In order for and action to be performed the user must come…
Zakorakis
  • 1
  • 1
  • 4
-3
votes
1 answer

Telegram bot Python, how to send message to certain users when another event triggered

I already have a script which checks my gmail inbox and twits the certain mails at certain intervals, for this i use a while True loop to have it run infinitely. When i want to apply the same thing into a Telegram bot: bot.polling() takes precedence…
angebot
  • 11
  • 1
  • 4
-3
votes
1 answer

Telegram Bot which sends any member of a Group a DM

is there any Telegram bot out there which can send a private message to any member of a Group(where I am not the owner). If not, how would the procedure look like to build one?
Nordic Guy
  • 301
  • 5
  • 13
-3
votes
1 answer

Is it possible to make a telegram bot that could search through an google spreadsheet and return specific cell value?

So the idea is that the telegram bot would perform a similar function as the search function in google spreadsheet. I have researched on internet and couldnt find any tutorial or case on this. The scenario would be like: telegram bot: input /search…
1 2 3
96
97