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
1
vote
2 answers

How to check sources who join my channel on Telegram?

I have a Telegram channel and I share links on YouTube, Facebook, blogs and other sites. So my question is how to know from what source the user joined? Please help me to solve it. Thanks.
Nguyen Hoang
  • 65
  • 1
  • 8
1
vote
1 answer

How to get all the pinned messages in a telegram chat using pytelegrambotapi?

I'm trying to retrieve all the pinned messages in telegram chat for my bot. From the following code prev_message = bot.get_chat(chat_id).pinned_message.text I am able to retrieve the recent pinned messages. Is there a way to obtain all of the…
1
vote
1 answer

How to send data in one message to a telegram bot?

Now I'm making a method, after which the data is successfully sent from the telegram bot to the user. Now I have made this option. However, the problem is that all data is sent separately. And if we assume we have 20 books in the matrix, we get 21…
David
  • 13
  • 3
1
vote
0 answers

how can I find the Telegram user msg not bot (initialized by user) in flutter?

I want all the messages (send/receive) from the user (Not Bot) to get some specific groups massages in my flutter app. Note: I have a user name. Can it be possible Please guide me about it? I can get messages from the bot and send messages from the…
fun
  • 107
  • 6
1
vote
0 answers

Send message to Telegram bot Python

I have such code, that can send message to user, but how can I implement sending message to bot and read it? I have to see what user send to bot. Code: import telegram api_key = 'mytoken' user_id = 'myID' bot =…
1
vote
0 answers

How to get user ID by username/mention - Telegram bot api

I am trying to create my own admin bot that can handle a lot of the admin stuff, such as muting users... Currently I can mute users by tagging/replying to their message, but I also want to be able to mute a user by @mentioning (such as @Netsu) them,…
Netsu
  • 1,399
  • 1
  • 7
  • 18
1
vote
1 answer

Is it possible to pass array containing userids to add to telegram group in single request?

I don't want to make many request so was wondering if it's possible to create an array of users i intend to push to my telegram group and make a single request. client(InviteToChannelRequest(target_group,[user_array]))
1
vote
1 answer

How integrate in my python code the google translator api correctly?

I'm actually doing a bot that forward messages from a channel to another channel. It apply some changes like replace words, avoid voice or images ( as defined in the upper part of my code), and works perfectly this way. But i'd like to add a…
Jerykko
  • 11
  • 2
1
vote
2 answers

How to find which part of text message has a nested link/and open it?

Example text message I received on telegram: Listen to best music: Ava Max - My Head & My Heart My question is, how can my script check the message and eventually open the site via nested link? I tried: for entity in event.message.text: …
RektLeft
  • 93
  • 1
  • 8
1
vote
0 answers

How to know from which youtube video description link the person joined my telegram channel?

I have a youtube channel on which I make educational videos and I also have a telegram channel to share study material, I mentioned my telegram channel link to my every youtube videos in discription box.. Now I want to know is their any method to…
1
vote
1 answer

Python-Telegram-Bot How to allow for multiple callbackdata when using InlineKeyboard?

Is it possible for the user to click on multiple buttons, thereby appending all the callback_data into one single data set, and only quit the current state of a handler after clicking on the Done button? My understanding so far is that you can only…
junneng
  • 35
  • 5
1
vote
0 answers

Roll the dice problem in ReplyKeyboardMarkup of telegram bot

I wrote a telegram bot that gives users ReplyKeyboardMarkup to roll the dice. For android and pc users everything is good, but for ios users when they click on they just send a text instance of although must be sent a rolled one.
1
vote
1 answer

Sending public channel reply Telegram messages with Telethon

I'm working with Telethon have been able to successfully send messages as well as pull public channel messages sent by other members, but I was wondering if there is a way to reply via sendmessage to an already posted message. The sent reply would…
1
vote
0 answers

I can't write a built-in bot

I am writing a built-in bot on the C# and such a problem has arisen. I don't understand how to make the user enter a query when entering the bot's username, and the bot outputs the results. I don't understand at all where to insert a query into the…
qabs
  • 11
  • 1
1
vote
1 answer

How to get photo description in python telegram bot api?

I'm trying to get a photo description in telegram using python and Telegram bot api Function to get it: from telebot import * from config import bot from tasks.sport import sport @bot.message_handler(content_types=['photo', 'text']) def…