Questions tagged [telegram-bot]

The Bot API is an HTTP-based interface created for developers keen on building bots for Telegram which is an instant-messaging app with documented API. Use this tag if you're writing a telegram bot and have a specific question regarding the Bot API.

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

How to add a "back" button to a Telegram bot?

I can’t figure out how to implement a “Back” button that would return to the previous menu. I've tried using a stack to keep track of previous states, but it's inefficient and doesn't always work. Is ...
Alexandr Kolosov's user avatar
-2 votes
0 answers
22 views

printing KeyError: 'photo_1'. Need to get a photo [closed]

printing error File "D:\Питончик\Bot po physics.py", line 35, in count desired_photo=globals()[photo_name] KeyError: 'photo_1' code: import telebot import requests from bs4 import ...
denverskill's user avatar
0 votes
0 answers
7 views

How can you do end-to-end UI testing for Telegram bots?

Telegram allows writing bots that send messages with actionable buttons, like these: If I'm writing anything with a user interface, I would like to do end-to-end UI testing of that user interface, ...
gvlasov's user avatar
  • 19k
1 vote
0 answers
24 views

Telegram t.me on Android

I'm publishing a link to my Telegram bot using the above format. It works well, but if you don't have Telegram installed, it presents you with a download link that goes down the route of installing an ...
Graham Tilson's user avatar
1 vote
0 answers
16 views

Are there ways to go to the selected channel using a button in the bot?

In telegram there is a KeyboardButtonRequestChat object, when you click on the button it opens a list of chats sorted by certain criteria, then you can get the id of this chat using ChatShared. ...
Alexandr Kolosov's user avatar
-1 votes
0 answers
17 views

I am trying to make a telegram bot and send me a message but I don't get any

The result shows me following sentence: <coroutine object Bot.send_message at 0x7a07fd2073e0> I think it means there are no errors. However, I don't get the message from my telegram bot. I ...
gp onlyhalf's user avatar
-1 votes
1 answer
43 views

Can't add an inline keyboard to a user bot message

I have a problem when creating a user bot on the Pyrogram API. When sending a message to my Favorites, I specify an inline keyboard object, but it is not sent with the message (BUT THE MESSAGE WAS ...
Lil dokie's user avatar
1 vote
0 answers
54 views

Sending image to telegram chat in a single message, with formatted multiline text, using curl in bash

I'd like to send (in a single message) an image with some text, formatted and multiline. I think there's a way to achieve my goal as I can see this type of posts in different telegram groups (single ...
Benno's user avatar
  • 11
-1 votes
0 answers
21 views

Telegram bot want to return a function

Basically I want to make it so when a player answers i want the buttons to pop up again. import telebot from telebot import types bot = telebot.TeleBot('6579423014:AAEvKIDILsWgQFQS4Y3U8D2lUSwZrom___w'...
Maxim's user avatar
  • 1
-1 votes
0 answers
14 views

How long does Telegram wait for a webhook response?

I have a Telegram bot that performs tasks like compiling and executing code, which can take a few minutes. I set a deadline of 30 seconds but would like to extend it. My project is asynchronous, so it ...
Rodrigo's user avatar
  • 120
-1 votes
0 answers
23 views

Telegram: write in an individual chat [closed]

I would just like to understand if, as demonstrated by certain video tutorials (for example on YouTube), it is really feasible to write lines of code that write messages in Telegram chats. In ...
manueurofax's user avatar
0 votes
0 answers
18 views

Can not move file to another folder after Faraday::UploadIO telegram api

I iterate the folder with images and if they don't fit the file size, I compress them and send the compressed version as a photo and the uncompressed version as a file. Then I wanted to move the ...
Alefi's user avatar
  • 1
0 votes
0 answers
11 views

Telegram sends multiple duplicate /start commands on Android when opened with Deep Link

We are using Referral link to open our Telegram bot. Clicking the link takes user to our Bot and hits start command with params. It works but on Android, it sends several /start messages altogether ...
Hardik Patel's user avatar
0 votes
0 answers
26 views

Extending "typing" status till bot's reply

@dispatcher.message() async def telebot(message: types.Message): global reference await bot.send_chat_action(chat_id=message.chat.id, action=telegram.constants.ChatAction.TYPING) print(f&...
TANMOY CHANDRA's user avatar
0 votes
1 answer
40 views

Python telegram bot - problem sending messages through the bot to a chat as if they were from a user

Im creating a telegram bot and im stuck with one problem. After launching the bot, it sends me two buttons, "yes" and "no." I press one of them, and I want my response to remain in ...
Maria Osipova's user avatar
1 vote
0 answers
11 views

How to embed image on top of message in telegram api

I found that one channel was able to embed its image inside telegram. How can I achieve this? Whenever I send photo. it looks like below. How can I make the photo visible without OPNE WITH?
Antonio SEO's user avatar
0 votes
0 answers
16 views

Telebot send message to specific user

@bot.callback_query_handler(func=lambda call: call.data == 'current_sending') def serch(call): keyboard = types.InlineKeyboardMarkup() for clients in sqlite_db.get_all_clients(): ...
Murder Mine's user avatar
-2 votes
0 answers
33 views

How can I get the IDs of all old and current members of my Telegram bot? [closed]

The previous owner of the bot did not collect chat_ids manually (did not use MySQL, database, etc.). I am now the owner of the bot. I tried to find out the id of the previous users but I couldn't find ...
Jamoladdin Otaxonov Coder's user avatar
0 votes
0 answers
25 views

How to send large video like a normal one with telebot?

I have my own bot for downloading videos from TikTok, but due to Telegram restrictions on video size, videos that weigh more than 20MB look very strange when sent screenshot of the problem Here is the ...
w1cee's user avatar
  • 85
0 votes
0 answers
15 views

Telegram bot v(Python): workflow loop issue

I've got a task in school to create a Telegram that would give a user some test and then use ChatGPT to give some suggestions. I've decided to give user The Luscher Color Test and then give them music ...
TTOVARISCHH's user avatar
0 votes
3 answers
57 views

Telegram telethon messages forwarding bot stopped working

starting from yesterday' afternoon my messages forwarding bot stopped to work from grabbing messages from channels, but it seems to work with channels where I am admin. In a few words these code lines ...
Antmau's user avatar
  • 41
0 votes
0 answers
25 views

Is there a way to redirect all Telegram messages received by an account to a Telegram group, channel or bot?

I am trying to take all received messages from my telegram account (which i use for customer support, and is already known and used by my customers) and forward them to a subscription list (the ...
Oncoder's user avatar
0 votes
0 answers
13 views

Can one Telegram bot promote and demote another bot to admin?

I have two bots in my group, first bot have all available permissions, second bot just a simple group member. I try to promote to admin second bot with the first by sending https://api.telegram.org/...
Nijika Ijichi's user avatar
0 votes
0 answers
27 views

Telegram bot doesn't send messages to discord channel

I've tried creating a Discord bot that sends my messages to a Telegram group. Later on, I attempted to integrate the reverse process. From what I've seen, the dispatcher function has been modified, so ...
Ryckie45's user avatar
-1 votes
1 answer
32 views

Fetching the API_ID and API_HASH from telegram programmatically using python

I've been trying to fetch the API_ID and API_HASH from telegram programmatically using python. I was able to Create a session and log in programmatically. here is the code: import requests, random, ...
Avijit Bhuin's user avatar
-2 votes
1 answer
45 views

Python Telegram Bot error in deleting message and sending message

@bot.message_handler(commands=['stopgame']) def test2(message): bot.send_message(message.chat.id,'GIOCO FINITO!') gamerunning = false @bot.message_handler(commands=['startgame']) def ...
Fars29's user avatar
  • 1
0 votes
0 answers
23 views

Ssue with displaying data from the website by means of parsing

I need help, I'm not very good at JS, and I decided to practice by writing my first bot for Telegram. The bot works without errors until I start making changes. My task was to display information from ...
Sunnex's user avatar
  • 1
1 vote
0 answers
27 views

creating user bot in python, for clicking the messagebutton and joining to channels

The issue in the code is that the bot fails to subscribe to the channel specified in the link it sends, and it does not successfully click the button in the received messages. The message sent by the ...
Dilshodbek Sobirjonov's user avatar
0 votes
1 answer
32 views

Python Jobqueue multiple messaging problem

Jobqueue sends the same message 2 times even though the user_last_len value is the same when the user moves fast in the program and enters the function quickly, but when the user behaves slowly and ...
Arda Senoglu's user avatar
0 votes
1 answer
57 views

How to get channel ids?

I'm trying to write a bot for telegram that would send the id of this channel in response to a sent channel, but I don't understand how to do this if the channel was sent via KeyboardButtonRequestChat....
Alexandr Kolosov's user avatar
-2 votes
0 answers
42 views

Python not saving a variable

I am working with a telegram bot that uses an elif to detect the various button pressed by the user. In one of those I manage both the extraction of some blackjack cards and the reveal of the cards ...
Raysuoo's user avatar
0 votes
0 answers
20 views

"Failed to fetch updates - TelegramConflictError" in console when my telegram bot works

When my telegram bot works, console is writing every second: Failed to fetch updates - TelegramConflictError: Telegram server says - Conflict: terminated by other getUpdates request; make sure that ...
DOOOOOOOM's user avatar
0 votes
0 answers
19 views

Telegram Bot not able to send message. The same bot was sending earlier

I had created a telegram bot sometime back and it was working fine and sending message to required telegram group. But now its erroring out while sending messages. when trying google URL its working ...
ragendthsfdc pk's user avatar
0 votes
0 answers
37 views

No postData found in the request in Google Apps Script

I'm trying to fetch messages from Telegram to Google Sheets. How to fix this problem, everytime I run doPost on Google Apps Script, I get no response. But when I post something on my channel with my ...
Deka Halane's user avatar
0 votes
0 answers
12 views

telegram bot send request to the server and follow the url

Now I am writing a telegram bot and add inline keyboard to each message of my bot. In my bot I have a reply button which should send request to my webhook and after that follow user to a specific ...
Alex's user avatar
  • 1
0 votes
0 answers
51 views

I want to create a Telegram chat bot using python version 3.11.2

I am using python version 3.11.2 pip version 23.3.1 and bot-telegram version 25 My coding is like this: bot.py import os from dotenv import load_dotenv import telegram from telegram.ext import Updater,...
Reza Edi Saputra's user avatar
0 votes
0 answers
30 views

Chatting with Python Telegram Bot from Command Line for testing Handlers

I have a Python Telegram bot consisting of a set of handlers (as from telegram.ext). In my main.py for starting the bot, I create a telegram.ext.Updater using my API-token, then I add the handlers to ...
N. Jonas Figge's user avatar
0 votes
0 answers
9 views

How to forward same image to output of my telegram bot written in PHP?

I am not able to process the user provided image to forward same image in bot output. if user sent only text to the bot, all worked without any issues. But when user provide a photo with text to the ...
sudhakar singh's user avatar
0 votes
1 answer
80 views

How to solve Error: RPCError -503: Timedout (caused by SaveBigFilePartRequest) telethon send file error

When sending big files with await client.send_file(channel_id, file_name, thumb=thumbnail, caption=caption, attributes=[types.DocumentAttributeVideo(duration=video_duration, w=0, h=0, ...
Nikovlod's user avatar
0 votes
1 answer
66 views

Disable copy-button in Telegram pre-tag

I use a Telegram-bot for sending updates from my Home Automation. I like to do some text styling for easier reading and a quick notice of special messages. Mostly I use bold, italic or underlined text,...
Joete's user avatar
  • 39
0 votes
0 answers
14 views

How to use ChatJoinRequestHandler for telegram bot?

This is how I initiate the app: application = Application.builder().token(os.getenv(bot_token)).persistence(persistence).build() new_member_handler = ChatJoinRequestHandler(send_hello_message) ...
Didjey's user avatar
  • 55
0 votes
0 answers
36 views

Aiogram issue: ParseMode

(venv) legion@LittleKid:~/Projects/FacialRecognition/api$ python3 tests.py Traceback (most recent call last): File "/home/legion/Projects/FacialRecognition/api/tests.py", line 172, in <...
Abdusamad Abdullakhanov's user avatar
-1 votes
0 answers
19 views

Telegram bot api how open webpage by inline Button inbuilt

See I want to make this type button how to make tell me in php or nodejs Please Help me out. In php and nodejs how send this type button that open inbuilt webpage then in webpage how send data etc . ...
Suresh Bhati's user avatar
1 vote
0 answers
26 views

Telegram Bot: How to handle custom reply messages along with those from the keyboard?

I created a Telegram Bot for a flower shop using node-telegram-bot-api. Some of the questions I ask a user can be replied using a reply keyboard (for example, the time and date of the delivery, or if ...
katrin_melody's user avatar
0 votes
0 answers
25 views

Bot telegram does not receive messages with media

I wrote a simple bot in Javascript, with App Script from Google, that needs to send me the messages it receives, via email and via chat, but I noticed that whenever the message contains media (photos, ...
Ivan Notarstefano's user avatar
0 votes
1 answer
57 views

Python TelegramBot JobQueue not performing return

update.message.reply_text works fine but I can't perform the return function because it can't pull context.user_data properly so it keeps sending the same message every 10 seconds async def matching(...
Arda Senoglu's user avatar
-1 votes
0 answers
22 views

Embed telegram video to our website like normal mp4 video

i want to host telegram video to our website, like this bot @AutoFileStreamBot , once i send any video to this bot , he immediately generated download link and he also embedded that video immediately ...
Sharpshooter Gaming's user avatar
0 votes
0 answers
25 views

Python telegram-bot V20 Send message at statup

on telegram-bot V20. how to send message on startup? Precedent version i don't have a problem with async/await. Now: def main(): app = ApplicationBuilder().token(TOKEN).build() app.bot....
Salvatore Colantonio's user avatar
-2 votes
0 answers
30 views

cant add google calendar to telegram bot

I'm running it in the terminal so i dont hame domain for redirect URI and i just use port 8080 i put this redirect uri in OAuth creditional and imported it but i get mismath import telebot import ...
sheesh's user avatar
  • 1
1 vote
0 answers
55 views

How get message text sent by my bot using message ID in telegraf-nodejs?

I've built a bot that send messages in a channel by nodejs using telegraf; I save the message ID returned by the 'sendmessage' function because I need to add addictional text to it after a while. I've ...
Scarpia999's user avatar

1
2 3 4 5
101