telegram

Getting/sending some information from Telegram at bot startup, after Application build() but before run_polling()?

Getting/sending some information from Telegram at bot startup, after Application build() but before run_polling()? Question: I’m a bit confused about this because Im new to python-telegram,-bot, and most examples online dont reflect the v20 changes for Updater and asyncio. The relevant snippet of code is: def main() -> None: persistence_object = PicklePersistence(filepath=persistent_data_file_path) application = ( …

Total answers: 1

How Run_daily works (JobQueue || Python telegram bot)

How Run_daily works (JobQueue || Python telegram bot) Question: Testing simple bot that should send message every day at certain time. When i was testing run_repeating it worked normally. But when i use run_daily it’s just doesn’t send anything end ignore time in the parameters. I checked documentation and everything seems normal. But it’s just …

Total answers: 2

Runging own Telgram bot based on PTB 13x and local Telegram bot API behind nginx

Runging own Telgram bot based on PTB 13x and local Telegram bot API behind nginx Question: Try to use local Telegram bot API to take benefits of larger files for my bot serving and helping users in supergroup with files as described here Build stack with Telegram Bot API, nginx as reverse proxy and my …

Total answers: 1

MessageHandler not able to catch commands

MessageHandler not able to catch commands Question: we would like to monitor users who send commands to the bot, but when the bot is started, the messagehandler is able to catch messages and report that a private chat is started, but it seems that it can’t catch any of the three pre-defined commands(which are working …

Total answers: 1

Python Telegram bot doesn't start running at all

Python Telegram bot doesn't start running at all Question: I am a Python beginner trying to create a Telegram scheduler bot using the python-telegram-bot library and some code snippets I found online. However, when I try to run the code, the bot doesn’t seem to start running at all. I have double-checked that I am …

Total answers: 1

Subscribe mechanism in telegram bot

Subscribe mechanism in telegram bot Question: I’m trying to build a bot that basically has two threads. One thread is doing something, generating data and another thread is managing telegram bot. User can subscribe on telegram to receive updates from the first thread. This first thread calls the second one when it generates data and …

Total answers: 1

how to send an image group with telethon in telegram in python

how to send an image group with telethon in telegram in python Question: hey I’m trying to send some images to a group in telegram using telethon to do it with my own account not a bot. but I have a little problem. it errors some how that I think some where I made a …

Total answers: 1

How to send some files with telegram bot in python

How to send some files with telegram bot in python Question: I’m trying to upload the outcomes of my code (they are images) in a group with a Telegram bot. I’ve tried: import requests import numpy as np paths=np.array([]) for z in range(8): paths=np.append(paths,str(f"path\{z}.jpg")) url="https://api.telegram.org/bot<<my-bot-http-token>>/senddocument?chat_id=<<chat-id>>" for path in paths: files={‘document’:open(path,’rb’)} resp=requests.post(url,files=files) It works but it …

Total answers: 1

Sign in via Telethon

Sign in via Telethon Question: I’ve written a script for my friend, which uses Telethon. There I sign in with the following line^ with TelegramClient(‘test’, API_ID, API_HASH) as client: Well, it actually works with my account and another one, that is not mine. However, my buddy can’t pass the auth. He doesn’t receive verification code, …

Total answers: 1