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
11
votes
3 answers

Telegram bot: How do I hide inline keyboard ? PHP

I made a telegram bot with an inline keyboard.(via InlineKeyboardMarkup) I like to hide (or make it one-time) keyboard after user response. How can I do that in PHP? Here is a view of my bot:
Seyfi
  • 1,832
  • 1
  • 20
  • 35
10
votes
1 answer

How to run firebase (functions) emulator on https instead of http?

Would anyone know if there is a way to initialize a Firebase function (using emulator to debug locally) with an https address instead of the default http? I'm trying to debug a Telegram bot-related script and Telegram only allows https…
10
votes
3 answers

How to make that when you click on the text it was copied pytelegrambotapi

I am writing a telegram to the bot. I ran into such a problem. I need the bot to send a message (text) when clicked on which it was copied (as a token from @BotFather)
DanDyFun
  • 141
  • 1
  • 1
  • 5
10
votes
2 answers

Prevent a Telegram bot from being added to any group or channel (allow adding it to whitelisted groups/channels)

As far as I read the Telegram Bot API's docs, Telegram do not limit the calls to your webhook callback in any way. I am creating a Telegram Bot that will be available only for groups and channels that I will whitelist. I can filter out the messages…
10
votes
3 answers

How can I bold text in telepot Telegram bot?

I have tried this elif command == 'bold': telegram_bot.sendMessage (chat_id, str("*bold*"), reply_markup=markup) But it is replying *bold* instead of bold
SudoGuy
  • 165
  • 1
  • 1
  • 9
10
votes
2 answers

Telegram bot initiate conversation with a user

I am writing a Telegram bot, to simplify the issue let's say you can ask the bot questions in a channel and it replies to you in private. When the bot receives the command it takes the chat_id of the user from: update.message.from_user.id But when…
Uri Shalit
  • 2,198
  • 2
  • 19
  • 29
10
votes
3 answers

How can I remove inline keyboard after click?

My bot sends a pick with 2 inline callback buttons: like / dislike. After a user clicks on like or dislike button, I want this inline keyboard to disappear. This is how I make a dislike button dislike_button =types.InlineKeyboardButton…
Alex Nikitin
  • 841
  • 1
  • 10
  • 29
10
votes
3 answers

handle deleted message by user in telegram bot

Is there any way that can handle deleted message by user in one-to-one chat or groups that bot is member of it ? there is method for edited message update but not for deleted message .
alireza
  • 1,173
  • 4
  • 19
  • 40
10
votes
3 answers

Telegram Bot send Message to bot

I have programmed a telegram bot. This works fine when sending to groups or to users. However I do a special requirement. I need to be able to send to another bot. When adding both bots to a group as administrators. I still cannot receive the…
RG01
  • 121
  • 1
  • 1
  • 9
10
votes
5 answers

Save user input after certain message telegram bot

I am building some telegram bot on python (using this framework pyTelegramBotAPI). And I ran into the problem with user input. I need save user input(it can be any text) after certain bot's message. For example: Bot: - Please describe your…
10
votes
1 answer

How do I send a message to Telegram that includes a button that prompts the user to forward the message?

Many Telegram bots (e.g., @youtube) have a button you can click on to forward messages sent by the bot. When the user clicks on this button, Telegram opens a contact list that lets the user choose who to forward the message to. How can I send a…
Thomas Johnson
  • 10,776
  • 18
  • 60
  • 98
10
votes
3 answers

How to make phone number a link in Telegram Bot?

Our team tries to create the Telegram Bot and it is essential for us to make phone number in the long messages clickable. Sometimes we have to send our users messages with a lot of information and few phone numbers, so it is hard to get the phone,…
Sergey Cherepanov
  • 629
  • 2
  • 7
  • 19
10
votes
2 answers

Which video format is right for `sendVideo` method in Telegram Bot API

Which video format can be used in Telegram Bot API sendVideo method? On the page they only mention "H.264/MPEG-4 AVC" So if I convert a video (without sound) with ffmpeg -i input -an -c:v libx264 -crf 26 out.m4v I get an ok:true as response but I…
Andy
  • 7,931
  • 4
  • 25
  • 45
10
votes
1 answer

Telegram geolocation

I have an idea to use a telegram bot for food ordering from a smartphone. So, you have a menu, prices, there is a payment gateway. This part seems clear to me. I was wondering if there any way to get a geolocation information inside telegram? So…
B.I.
  • 706
  • 3
  • 9
  • 19
10
votes
2 answers

Node Telegram bot api, make chain conversation between user

I have started to write bot logic for telegram by using this module I can create simple question and answer logic like this: bot.onText(/\/start/, function(msg, match){ bot.sendMessage(msg.chat.id, "Hello this is great bot"); }); When user types…
Mr.D
  • 7,353
  • 13
  • 60
  • 119