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

Is it possible to disable Telegram's standard text input while buttons are available?

I'm writing a Telegram bot that provides button choices to the user. I'd like to ensure the user chooses from one of the buttons, rather than sending a custom text message or sticker or whatever. Is there some way to do this? As far as I can tell…
digitalWestie
  • 2,647
  • 6
  • 28
  • 45
1
vote
0 answers

Telegraf.js does not display some thumbnails in the audio media

By some query, using ytsr I get information about the video (link, thumbnail, etc). Then, using ytdl-core, I download the audio of this video and return the cropped thumbnail (320x320 - telegram thumbnail standards) When trying to send an audio…
1
vote
1 answer

python-telegram-bot: Pass arguments to the bot

I see some bots acts regarding args passed to the bot. For example: https://t.me/name_bot?start=something This is helpful for sending invitations/ referral / promo codes etc. How can I handle this using python-telegram-bot and getting the start…
AKMalkadi
  • 782
  • 1
  • 5
  • 18
1
vote
2 answers

cannot read properties of undefined (reading 'message_id')

i try to create my pm telebot with telegraf. im new at javascript. can someone help to fix my code? const { Telegraf, Telegram} = require("telegraf"); const n = new Telegraf(process.env.token) const chat_id = process.env.chat_id n.start((ctx) =>…
yo ndk tau
  • 11
  • 3
1
vote
0 answers

Error sending media group: [400] Bad Request: wrong remote file identifier specified: Wrong string length

I'm building a Java telegram bot, and one of the features is to send a group of photos from local. However, when executing the bot, it fails to upload the photos with error…
Yang Liu
  • 541
  • 9
  • 26
1
vote
1 answer

node js - How to save received file from telegram bot

How I can save a file from a stream or from an url in nodejs? I have a telegram bot that will get files from users. I'm able to get the file url or the stream but I'm not sure how to save it in a temporary directory before process. Here is the link…
user17546097
1
vote
0 answers

Using pytiktok with telegram-bot

I was trying to use pytiktok along with telegram-bot to download a tiktok video when the user send a valid tiktok link while I'm using the updater.start_polling() I get 2022-03-12 19:00:56,313 - apscheduler.scheduler - INFO - Scheduler started…
1
vote
1 answer

pyTelegramBotAPI always returning the same function

I'm building a Telegram bot using pyTelegramBotAPI and I'm facing a problem that it's always returning the second function even when I send a text that doesn't exist. My code is: import os import telebot import requests from eletronic.light import…
1
vote
1 answer

Im trying to make my telegram bot send a profile picture for every username he recive but I keep gettig this Error

I know that "UserProfilePhoto" is an object and cant be send on telegram but I dont know how to transform it in to photos and send it I keep getting this Error: TypeError: a bytes-like object is required, not 'UserProfilePhotos' import os import…
Mohammad Safi
  • 13
  • 1
  • 3
1
vote
0 answers

Live Location Keyboard on TelegramBot via NodeJs

How can I build a button to request a live location from the user through a Telegram Bot? I am using node-telegram-bot-api package in this project. I have this bot that requests location from the users. So far I've managed to build a button that…
Hafiz Hanif
  • 361
  • 1
  • 3
  • 20
1
vote
1 answer

Does it possible to run a function/callback without typing any command using python-telegram-bot?

I developing a telegram bot using python-telegram-bot and I'm trying to send a message using a function/callback without typing/entering any command. The server itself runs locally on my machine. I also have stored every user_id who sent the /start…
1
vote
0 answers

Speech to text wit.ai telegram bot

I'm making a telegram bot. Using node js (node-telegram-bot-api), axios, wit.ai. Voice to text not working. What i doing wrong?I need to translate a voice message into text, but my script does not work require('dotenv').config() const TelegramApi…
1
vote
0 answers

Using JobQueue for different users

I want to have a notebook Telegram Bot that works like a reminder. The bot basically will help users to take notes and remind them after a certain time (I know there are millions of bots like this one, but it is just for educational purposes). I…
1
vote
0 answers

Telegram Bot only reply message to sender (in group chat)

I am working on a telegram bot project, I would like to know if it is possible for bot to reply back to same user that sends the command in group chat, but not have the rest of the group see it? Can I do that? If so, what is the direction? Thanks…
Hoàng Nguyễn
  • 75
  • 1
  • 12
1
vote
0 answers

get users and chatid groups does my bot belong to

How can I get information about what groups does my bot belong to. My bot is an admin in 10 channel and I want to get my channel users list and chatId for save to db. How can I do that in nodejs?
Rottmayerr
  • 19
  • 1