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
13
votes
4 answers

Telegram bots: How do you remove a command with botFather

I am trying to erase all commands from my bot using botFather. I couldn't find docs for this. There is an option to send a new list of commands to the BotFather, however this does not help me as my bot doesn't have any commands as I am working with…
Guy
  • 12,488
  • 16
  • 79
  • 119
12
votes
1 answer

Why is '.' a reserved character in MarkdownV2 in Telegram's Bot API?

As of Telegram's Bot API version 4.5, the API supports a new text format, MarkdownV2. This is an enhanced version of the previous Markdown support. The "specification" for MarkdownV2 says: Inside (...) part of inline link definition, all ')' and…
Anakhand
  • 2,838
  • 1
  • 22
  • 50
12
votes
2 answers

In telegram i want bullet points , numbering and indentations but its not working

I need to format my text in telegram. I try to use markdown language for the following text: * Item * Item It prints the text as it is. It is supposed to print bullets instead. I am following this link:…
Nishant Lakhara
  • 2,295
  • 4
  • 23
  • 46
12
votes
3 answers

What HTML tags can be used to send a message on Telegram Bot?

I´m developing a telegram bot in c#. Using the class TelegramBotClient in Telegram.Bot library. I want to send a message with SendTextMessageAsync using HTML option. In the official documentation (https://core.telegram.org/bots/api#markdown-style)…
David Con
  • 422
  • 3
  • 5
  • 15
12
votes
4 answers

Open Telegram chat (with a Bot) from a iOS app

I'm trying to open Telegram from my app, for the users to talk with a bot I made. So far, it is working but the only way I found to get the bot chat opened was using the https://telegram.me/MyBot url. But this way, it opens Safari, and then the user…
Lucas Almeida
  • 245
  • 2
  • 11
12
votes
3 answers

How can I get messages from a Telegram channel with the Telegram API

How can I access to a Telegram channel messages with a bot registered as channel admin? I am trying to get all the messages from Telegram channel and display them in an ASP.NET webpage (c#) I am able to get updates when new message sent directly to…
Tamoochin
  • 129
  • 1
  • 1
  • 3
12
votes
2 answers

Python Telegram Bot - Send Image

I'd like to send a Image (via URL or Path), on request. I use the source code here. The code has already a sample to send an image (via URL or Path), but I don't get it since I'm new to Python. Here's the sample code snippet: elif text == '/image': …
ColinDave
  • 490
  • 1
  • 6
  • 16
12
votes
4 answers

Telegram API messages order

I am building a telegram bot. This means I am managing several chats at once (each with a unique chat id). When a user sends a message to the bot replies with an answer. I am using the telegram API which is over HTTP. However, when I want to…
Guy
  • 12,488
  • 16
  • 79
  • 119
11
votes
0 answers

Telegram API POST /editmessagereplymarkup method executes with delay

Given: Telegram channel Telegram group Telegram bot with long polling strategy on board which handles all updates Messages with reply markup buttons Bot is based on https://github.com/rubenlagus/TelegramBots Action: Click any button twice (or…
imbananko
  • 122
  • 8
11
votes
4 answers

Send markdown text with telegram bot (telegraf), nodejs

How to send markdown text by telegram bot using telegraf library on nodejs?
hitt
  • 381
  • 1
  • 3
  • 14
11
votes
3 answers

How to send large file with Telegram Bot API?

Telegram bot has a file size limit for sending in 50MB. I need to send large files. Is there any way around this? I know about this project https://github.com/pwrtelegram/pwrtelegram but I couldn't make it work. Maybe someone has already solved…
bigspawn
  • 1,727
  • 3
  • 16
  • 16
11
votes
1 answer

Upload a file with POST request golang

I'm new to golang and I'm trying to write a function that uploads a file with a post request to telegram for a bot I'm writing. I've tried with this code but the error I'm getting from telegram is Bad Request: there is no photo in the request. I've…
NicoNex
  • 469
  • 2
  • 5
  • 15
11
votes
5 answers

how save photo in telegram python bot?

i want to write a telegram bot that save photos . this is my code , but its not working. and i don't know what is my problem? def image_handler(bot, update): file = bot.getFile(update.message.photo.file_id) print ("file_id: " +…
Ali Akhtari
  • 1,211
  • 2
  • 21
  • 42
11
votes
3 answers

How to download all shared media files from a telegram group?

There is a telegram group with more than 40,000 shared files in it. Is there any bot to download all of them all at once? If not is there any telegram api script method using python to download shared media files?
Mohsen Haddadi
  • 1,296
  • 2
  • 16
  • 20
11
votes
4 answers

How To Obtain Username, First Name Or Last Name Of A Telegram User With Python-Telegram-Bot?

I'm Creating A Telegram Bot Using Python-Telegram-Bot I Know That update.message.chat_id Returns The User's Chat ID, But I Need To Know How To Get User's Username Or First Name And/Or Last Name. I've Found This On Telegram's Documentation But I…
Sadegh Alirezaie
  • 343
  • 1
  • 3
  • 17