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 get File_ID of an Image Generated by Bot?

I'm currently generating an image buffer and sending it to a group using ctx.replyWithPhoto({ source: myBuffer, filename: "image.png" }); I'm wanting to reuse this photo to send later and I figured I could use Telegrams file_id for this, but I…
1
vote
1 answer

How to get the result from inlinekeybord in python-telegram-bot

I am unable to get the query.data second time when I click on inlinekeybord. In my code when the bot start it gives some choice to select. when one option is selected the bot send another options list respect to user selected option. Again when user…
Swagoto
  • 31
  • 4
1
vote
0 answers

Telegram bot inline mode. How to make it send local voice recordings?

I've got some problem with adding local voice file to results array in answerInlineQuery method of inline_query mode. import TelegramBot from 'node-telegram-bot-api' const bot = new TelegramBot('my bot token', { polling: true…
Nicola
  • 11
  • 2
1
vote
1 answer

Python telegram bot, forward edited message

I'm building a dating bot through memes Anything can be a meme (voice message, video, gif, story, photo album, something I forgot) I don't want to create a bunch of handlers, I want to forward the message and attach a keyboard to it to react like /…
A B
  • 43
  • 5
1
vote
0 answers

Mute user that i have replayed with telebot

I am using pytelegrambotapi, and this code def mute(message): bot.restrict_chat_member(message.chat.id, message.from_user.id, until_date=time()+86400) But it doesn't mute person i reply, what should i do?
1
vote
1 answer

Telegram bot replies even on random texts

I am creating a Telegram bot which would reply Hello in random languages. Is working fine but the problem is it replies even when I send something randomly with no meaning like sfdsfjls. What should I do so that it replies only when I say Hi or…
Yash Dwivedi
  • 47
  • 1
  • 5
1
vote
0 answers

Return Back Php and MySQL Telegram Bot

how do I get the user back by starting from $ stepUser 4 if it gets to the error "text" => $ errorPhotoAll? I would like when it gets to else if ($ countPhoto> 2) and then gets it wrong, it returns to the beginning of this condition. Moreover, when…
1
vote
0 answers

Can the Chat ID of a Telegram user be changed?

It is known that the chat_id of a Telegram user uniquely identifies that person. But are there any circumstances under which this ID can be changed? I plan to use the chat_id (obtained through a bot) for user verification. The purpose of this is to…
bockzior
  • 199
  • 1
  • 6
  • 20
1
vote
1 answer

Telegram cannot send this specific URL as a link

Telegram does not like this link for some…
SSC Fan
  • 123
  • 10
1
vote
0 answers

Uploading a self-signed certificate for Telegram Bot

I have a Self-signed certificate on the server where the bot is located. The bot is written in Django, I send the following request curl-F "url=http:/ / promauto. ru/telegram/bot/" - F "certificate=@YOURPUBLIC.pem"…
Fedor
  • 11
  • 2
1
vote
3 answers

How to get messages of telegram channel by python-telegram-bot tool

I was wondering if there is a possible way to get messages from the telegram channel knowing that I logged in to this account and I am the admin of this channel so I just want the get messages. import feedparser from telegram import Update,…
Amr Khaled
  • 21
  • 1
  • 7
1
vote
1 answer

Why does the line `await asyncio.create_task(scheduler())` never run?

I am trying to get my telegram bot to send messages at a certain time but it doesn't work. The bot launches fine, everything works as intended except for the scheduled messages. I suspect the line await asyncio.create_task(scheduler()) never runs…
Naerwen
  • 23
  • 4
1
vote
1 answer

How to delay aiogram command?

I have inline buttons with a response to them, some people spam them, I would like to make a delay for the command. How to implement this? If possible, write another way to answer the user that the command can be written after a…
FollEnsoo
  • 39
  • 1
  • 6
1
vote
0 answers

Telegram bot inline keyboard markup can not received callback data JSON in google sheet when I use Google Apps Script

I use "Google Apps Script" to develop my telegram bot and I want to create a inline keyboard to receive users response data, so I have reference the telegram bot api "https://core.telegram.org/bots/api#available-methods" and create a function to do…
Alex Chang
  • 11
  • 1
1
vote
1 answer

How to create inline URL button in telegram via telegram bot using PHP?

I want to send a message with url button to my telegram channel using telegram bot. I have string msg = "Hello, Welcome To My Telegram Channel" imageURL = "https://cdn.pixabay.com/photo/2020/08/11/14/34/greeting-5480092_1280.png" buttonUrl =…
rdbhandari
  • 71
  • 7