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
0 answers

No error handlers are registered, logging exception

from googletrans import Translator translator = Translator() # In[2]:telegram_bot import telegram from telegram.ext import MessageHandler, Filters, Updater …
hyunseo
  • 55
  • 1
  • 5
1
vote
1 answer

Add button to forward message from channel in Telegram

I'm not quite sure it's possible but probably someone did that. Is it possible to use bot for appending button to message user forwarded to bot? I mean: Admin posted a message in his channel. Admin forwarded message to bot (assume bot added in…
matterai
  • 3,246
  • 4
  • 17
  • 29
1
vote
1 answer

aiogram: How to group, format and send multiple dictionaries

You need to send separate messages schedule for different days. Here is an example input: raspisanie = [{'week_day': 'Monday, 'name': 'Lesson 1', 'time': '8:30'}, {'week_day': 'Tuesday', name: 'Lesson 1', 'time': '8:30'}, {'week_day': 'Tuesday',…
1
vote
1 answer

Telethon automatic reconnecting

Hi there I have an idea for this script as usaull telethon libary when the system internet was dissconnect (not isp) it will try for 5 time(s) , I want to increase the number of trying to reconnect for exmple for many times or a infinity loop for…
MmDYi
  • 41
  • 8
1
vote
1 answer

Telegram Bot how to send HTML file directly?

I created a game using HTML, now I am trying to import it in my js file, and send to user. This is my code so far const { Telegraf } = require('telegraf') const bot = new Telegraf(process.env.BOT_TOKEN); const test =…
yongchang
  • 503
  • 6
  • 18
1
vote
1 answer

chat_member not getting invocked

I am using TelegrafJS and nodejs for developing a telegram bot and I want to use "chat_member" because it returns the invite link used by the user to join the telegram group. but the problem is it is not getting invoked. when new members are joined.…
1
vote
1 answer

Telegram Bot presses Inline button too long

I made a bot that should click on inline buttons. My problem is that one click on the buttons takes a whole 15 seconds. How can this process be accelerated? from telethon.sync import TelegramClient from telethon import functions, types from telethon…
Leo
  • 43
  • 9
1
vote
1 answer

Post Telegram message with multiple external photos using WTelegramClient

Post telegram message with single external photo: var im = new InputMediaPhotoExternal(); im.url = a.Photo; await client.SendMessageAsync(target, null, im); Is it possible to post message with multiple external photos using WTelegramClient?
AsValeO
  • 2,859
  • 3
  • 27
  • 64
1
vote
0 answers

How to add progress status of a downloading file in bash script

I want to show(regularly update) my download/upload progress of a file on my telegram bot. I'm using aria2 for downloading and rclone for uploading. And all I'm using is bash/shell script. What I Tried, ofcrs not worked. aria2c $url | text=$(grep…
sauraj
  • 25
  • 8
1
vote
1 answer

Telegram Bot Console.Readline Block Whole My Host when I Run my Telegram Receive as Background Service (IHostedService)

I have the project that have API Endpoints And Background TelegramBot Communication Background service as You Can See My BackGround Service at Below: public class BackgroundWorker: BackgroundService { private readonly IOptions
Ramin Azali
  • 198
  • 11
1
vote
0 answers

How to add parameters to telegram group invite link and get that parameters using telegram bot in group

I am making a telegram bot using nodeJs for a telegram group management I need to give referral points to a user who invites more users using the invitation link so I was finding a solution to check the new user has joined using which link so I can…
badrik patel
  • 123
  • 5
1
vote
1 answer

How to send Django model object's details as answer according to the user's choice of InlineKeyboardButton?

I'm new to creating telegram bots with Django. I selected python-telegram-bot library for creating bots with Django. I've created a Django model, named as category: class category(models.Model): name = models.CharField(max_length=250) …
1
vote
1 answer

how to send photo from telegram bot api (javascript)

I have a problem with sending the api via telegram text messages that arrive but the pictures are not arriving and I don't understand where the problem is Is it possible to modify this code and make it send images? var telegram_bot_id = "api"; var…
abidi abdo
  • 11
  • 1
  • 2
1
vote
0 answers

Can't get NewMessage event on SuperGroup (SelfBot)

I'm trying to listen to supergroup new messages, but I can't seem to be able to: from telethon.sync import TelegramClient from telethon import events, utils from telethon.tl.types import InputMessagesFilterPhotos api_id = 98..... api_hash =…
trueicecold
  • 820
  • 10
  • 23
1
vote
3 answers

Python countdown function for telegram bot

I found a countdown function on https://www.programiz.com/python-programming/examples/countdown-timer which i want to imply to my telegram bot function. When the below code run, it will send the message to the bot immediately and after 5s. But what…
Kong_vino
  • 11
  • 1