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

Telegram bot developed using telebot library in python won't work in telegram channels?

I build a simple telegram bot using the telebot library and it's successfully working! then I added the bot into a telegram channel it's not working! also, I added the same bot to a telegram group then it's working! I'm a little bit confused why the…
1
vote
0 answers

Spring Boot(Java) Telegrambots 5.3.0 SendMessage with html, how to attach image in it?

I would like to put image(link) inside html and send it over with Telegram. But when I try to put image inside html body it stops to work, that message won't be delivered after execution. I tried the approaches from this SO post: How to send an…
leonaugust
  • 186
  • 1
  • 4
  • 15
1
vote
1 answer

Inline mode fails to work in python-written telegram bot

I am newbie to Telegram Bot programming in Python. I created a simple bot @kawaikx_bot that has a /start command and can reply to any text input. from telegram.ext import * from datetime import datetime weekdays = [0, 1, 2, 3, 4] API_KEY =…
KawaiKx
  • 9,558
  • 19
  • 72
  • 111
1
vote
1 answer

How to extract one value at a time?

I'm trying to add a '/fact' command with Telebot module which returns a fact about dogs from API. However, I want it to return only one fact at a time, and a new one each time. I just don't know how to approach the issue. Here's my…
Dirael
  • 23
  • 3
1
vote
1 answer

Telegram 'guess the number' bot is changing the secret number every time it recives a new guess from the user

im making a 'guess the number' telegram bot, that is supposed to come up with an integer from 0 to 100. When the user tries to guess the number, bot should give them hints, showing whether their guess is smaller or bigger than the secret number. But…
Mistann
  • 25
  • 4
1
vote
0 answers

Telegram - telegraf hide inline keyboard for non admin roles

How to limit access so the inline buttons don't show up for all users in a group? If it's not possible, what's the best alternative to allow admins to click which sends a command in the chat as the admin himself replying or posting. Either only the…
1
vote
1 answer

poll answer handler with pytelegrambotapi

I've sent a poll using this: @bot.message_handler(commands=['start']) def start(message): bot.send_poll(message.chat.id,'choose one',['a','b','c']) but how could I get the answer back? the documentation say's: Handle poll answers…
M.Mevlevi
  • 339
  • 3
  • 16
1
vote
0 answers

How to get user input from a button click in telegram python?

I am new to python and I am trying to code a function such that upon a button press, the telegram bot perform something. My code goes something like this def action(msg): chat_id = msg['chat']['id'] command = msg['text'] keyboard =…
LatteCat
  • 31
  • 4
1
vote
1 answer

Get all emojis of Telegram Sticker

I would like to get all emoji of a telegram sticker. I have checked out their bot api but it only gives me the main emoji and ignores the others. For example for the first sticker of the Nekonyaaaa stickerpack, which has these ☺ emojis, I get only…
1
vote
0 answers

How to Improve the Responsiveness of Inline Keyboards

I've recently been working on a Telegram bot for automating data entry on a particularly annoying spreadsheet that some of my friends just don't like interacting with. So I thought I'd make them a nice telegram bot, so we can all push data to the…
1
vote
2 answers

How do I specify the dimensions of the video (height, width) when sending telegrams by bot?

I use the node-telegram-bot-api library. How do I specify the size of the video when sending it? // where to specify height and width ? bot.sendVideo( chatId, video, { caption: 'my video' }, { filename: 'my_file' }, ) The telegram API…
1
vote
1 answer

golang hangs when using multipart/form-data

I want to make an empty post request to telegram. The problem is if i close multipart once, it hangs forever: func main() { var requestBody bytes.Buffer multiPartWriter := multipart.NewWriter(&requestBody) multiPartWriter.Close() …
gcoder
  • 13
  • 2
1
vote
1 answer

'telegram-send' is not recognized as an internal or external command, operable program or batch file

I used cmd prompt to install telegram-send successfully. pip3 install telegram-send Then, I am trying to configure it in cmd prompt. telegram-send --configure but I am getting the following error: 'telegram-send' is not recognized as an internal or…
Khan
  • 13
  • 4
1
vote
1 answer

Sending a message with a python telegram bot without a command from the user?

Is there a way to send a message (call a function), without a command from the bot's user? For example when a certain condition is met? Currently I have only been able to call a function with a command. I have been trying the following: from…
Astudent
  • 186
  • 1
  • 2
  • 16
1
vote
0 answers

send inline keyboard after all reply messages telegram/telegraf

I'm using telegraf library to create a Telegram bot that would send gif messages upon request. I use inline keyboard for this and when i press an option of gif message to be received i need to await API response, receive 2-3 gifs and show inline…
ylsv
  • 123
  • 1
  • 2
  • 10