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
1 answer

How to make user hyperlink in python telegram bot?

Stack overflow! I'm using telebot module for my telegram bot (from telebot import types). I want to send messages to telegram users. In this messages I want to paste a link to another telegram users. My code is: linked_user =…
1
vote
0 answers

Python Pyrogram handle poll answers from users

I've sent a poll using Pyrogram but i don't know how to get users answers! For example: the quiz has 4 answers one of them is correct when the user press one of the answers i want to get what they pressed, here my…
louay075
  • 21
  • 3
1
vote
0 answers

the bot's polling works simultaneously in its own and main thread

I am faced with the following problem, I have several bots and a module that monitors their status. There are different threads for the bot and for monitoring. But I came across the fact that the telebot api returns an error to the…
1
vote
2 answers

How can i make a inline keyboardbutton with telebot for a chatterbot?

I am making a chatterbot and I wonder how can I put inlinekeyboardbutton, how can I make that? I need a code of keyboardbutton that handles a big conversation, please and thank you.
lucahh
  • 11
  • 4
1
vote
0 answers

How to program Telegram bot (using python) to create unique invite links for my telegram channel?

Telegram now has the new feature of creating unique invite links for channels. These links allow us to track how many people joined using a particular invite link. This is useful if you are running a referral program to see how many people joined…
1
vote
0 answers

Logging http error codes (500, 504) in telegram chat with bot

I have site that working with yii2 and nginx, send information from site pages to the chat in telegram with bot. Sometimes site can't load page or have troubles with something else. The task is that bot need text to chat, have problem HTTP:CODE, I…
Daizygod
  • 32
  • 1
  • 3
1
vote
0 answers

Telegram bot doesn't send message to one of my groups

I've built a telegram bot using Node.js to send a text message on specific times. So, I have 2 groups: one for testing and other to actually run it. It runs perfectly on testing group but it doesn't respond when it is supposed to run on my actual…
1
vote
0 answers

How to use telegram bot API forwardMessage method for bot command in python?

I'm trying to create a command for bot where user can write it like this: /send "message" And that message is sent to bot owner from the bot.
taspyr
  • 11
  • 1
1
vote
1 answer

Can another telegram user make me access his bot?

My friend has a tranding bot made with BotFather. Is there a way to make the bot shared betweeen our account in a way we can use it together?
Duccio Borchi
  • 209
  • 4
  • 13
1
vote
1 answer

Why do I get the following error when I try to edit message in group: ETELEGRAM: 400 Bad Request: message to edit not found?

Edit functionality works properly in private chat, but doesn't work in group chat. What might be the reason of that behaviour? I am getting the following error: Unhandled rejection Error: ETELEGRAM: 400 Bad Request: message to edit not found at…
Dzhakhar Ukhaev
  • 305
  • 1
  • 10
1
vote
1 answer

How to get the chat id, bot id, message id, channel id, group id using python-telegram-bot API?

I have created a bot in telegram and I wish to control it using python. I am using python-telegram-bot API. What is the easiest way to figure out various ids using the python: bot id, chat id, message id, group id, channel id? Is there any readymade…
KawaiKx
  • 9,558
  • 19
  • 72
  • 111
1
vote
2 answers

python-telegram-bot stops working after 5 min

I have created a telegram bot that sends screenshots of the browser webpage. I have used python-selenium package in order to connect browser with telegram-bot but each time my bot stops working after 5min, here is the full…
1
vote
2 answers

Is there a way to change avatar in telegram bot using python?

I was trying to find some documentation, but i`ve failed. I would be grateful if you send me doc or example how to do it.
qruim
  • 33
  • 5
1
vote
1 answer

How get id of the message I sent with my Telegram bot via Python?

To send the message on my Telegram channel, I use the following template that works perfectly: import requests headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99…
Digital Farmer
  • 1,705
  • 5
  • 17
  • 67
1
vote
1 answer

How to send a message via url with inline buttons

I can send message, sample: https://api.telegram.org/bot[TOKEN]/sendMessage?chat_id=@[USERNAME]&text=hello but I want to send message with inline buttons, please help.