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.

Available methods

  • getMe
  • sendMessage
  • forwardMessage
  • sendPhoto
  • sendAudio
  • sendDocument
  • sendSticker
  • sendVideo
  • sendVideoNote
  • sendVoice
  • sendLocation
  • sendVenue
  • sendContact
  • sendChatAction
  • getUserProfilePhotos
  • getUpdates
  • setWebhook
  • removeWebhook
  • getFile

Links:

4905 questions
7
votes
2 answers

Get last message/s from Telegram channel with Python

I'm using the python-telegram-bot library to write a bot in Python that sends URLs into a channel where the bot is administrator. Now, I would like to have the bot reading, let's say, the last 5 messages (I don't really care about the number as I…
7
votes
1 answer

Creating INVOICE in Telegram bot return's error

I try to integrate payments to my telegram bot. I usen telegraf library for working. So I create an invoice const invoice = { provider_token: payment_tocken, start_parameter: 'online_conslutation', title: 'Онлайн консультация…
nabiullinas
  • 1,185
  • 4
  • 20
  • 41
7
votes
3 answers

Telegram Bot - Process user response based on last bot question

I want my Telegram bot to process user inputs based on the last question the bot asked. Basically, this is the flow: User calls /authenticate command Bot asks for email User sends his email Bot answers with a message about sending a code to the…
Diego Victor de Jesus
  • 2,575
  • 2
  • 19
  • 30
7
votes
1 answer

Telegram Bot Error - telegram.error.BadRequest: Button_data_invalid

I'm trying to make a telegram bot with the telegram and telegram.ext libraries on Python. I try to pass callback_data for a button as a parameter for inline keyboard, but when it comes to add the keyboard as reply_markup, it sends the following…
Mickey Rodriguez
  • 71
  • 1
  • 1
  • 2
7
votes
3 answers

How to use Jobqueue in Python-telegram-bot

I have able to make a bot very easily by reading the docs but Jobqueue is not working as per it is written. The run_daily method uses a datetime.time object to send the message at a particular time but this code neither does its job of sending a…
7
votes
3 answers

How much length can be of a Telegram user_id?

I am making a database in which my algorithm only accepts queries from users with telegram id length of 9. user_id: 123456789; length = user_id.length; display(length); OUTPUT: 9 Are there telegram user ids of length lesser than 9?Can anybody…
7
votes
2 answers

Telegram sendMessage too slow for certain bot

I have two telegram bots and last time I have noticed, that 2nd bot became to slow. My research shows that sendMessage call has different time for two of them. curl…
tenta4
  • 304
  • 2
  • 16
7
votes
2 answers

Telegram bot should send URL that contains "&" character, but it sends the URL only until that character and then cuts it short

I want my Telegram bot to send a URL to a channel. However, the url contains the "&" character which cuts the message that it's trying to send short. The Telegram API documentation says I need to use & amp; (without the space) to replace & but…
KMFR
  • 895
  • 1
  • 15
  • 24
7
votes
2 answers

How to connect a WhatsApp group to Telegram group? any bot is there?

If we can connect a WhatsApp group to telegram group and get messages from whatsapp to telegram and vice versa then that will be great. Is any bot program available to do that. How to setup a bridge or something like that?
Ranjith Siji
  • 1,125
  • 3
  • 12
  • 19
7
votes
3 answers

How to send message in specific time TelegramBot

Hi i want to send message from bot in specific time (without message from me), for example every Saturday morning at 8:00am. Here is my code: import telebot import config from datetime import time, date, datetime bot =…
Ican
  • 119
  • 2
  • 2
  • 10
7
votes
1 answer

Sometimes bot can't mention user by id

I am writing an address book bot for my company group chat. The main idea of the bot is an ability to search users telegram contacts. For example /find search bot's database and reply mention of a founded user, so people can…
RoninDev
  • 5,446
  • 3
  • 23
  • 37
7
votes
2 answers

How many people use my telegram bot?

I created a bot @WeatherPlusbot How do I know how many people use it? Is there a way or "place" where you can count how many people have "installed" or currently use my bot? Thank you.
andrea
  • 396
  • 2
  • 12
7
votes
1 answer

How to Get Message_id from sent message By BOT Telegram?

I program the bot telegram. I want Get message_id By Bot ,when I sent a message to Group. My Code is PHP. $token = "MY_BOT's_TOKEN"; $data = [ 'text' => 'my message here', 'chat_id' =>…
hamed hossani
  • 986
  • 2
  • 14
  • 33
7
votes
2 answers

Get photo in telegram bot through pyTelegramBotAPI

I'm trying to develop a simple bot, that can retrieve photo from user and then do several operations with media file. I'm using telebot (https://github.com/eternnoir/pyTelegramBotAPI) for design. As far as I can see from the wiki, I can divide…
dand1
  • 371
  • 2
  • 8
  • 22
7
votes
1 answer

python telebot got unexpected response

I have been using my Telegram bot for sending me different notifications from my desktop computer using python's telebot library. Everything was working properly for quite a long time, but one day it stopped working. Here's the code (Python…
Andrew Che
  • 928
  • 7
  • 20