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 do I serialize this JSON response from API in Python?

The response from the API is: {"states":[{"state_id":1,"state_name":"Andaman and Nicobar Islands"},{"state_id":2,"state_name":"Andhra Pradesh"},{"state_id":3,"state_name":"Arunachal…
1
vote
1 answer

Installed python-telegram-bot but still showing "No module named 'telegram'"

Hi I already installed Python-telegram-bot using pip install python-telegram-bot. However, when i run my python file in VS, it shows "No module named 'telegram'. I confirmed that i only have 1 version of python installed 3.8.3 and still unable to…
Samuel
  • 225
  • 3
  • 11
1
vote
1 answer

How can I prevent my bot to fall asleep/idiling on Heroku!?, Cronjob is not executing after bot starts polling?

hope yall doing well. I have a telegram bot that I deployed on Heroku, but the bot fall asleep after 20-30 minutes, because I'm using Heroku's free dyno, I tried to prevent this by creating a cronjob which only prints something in the console to…
1
vote
2 answers

how can i ban some numbers from checking on bot

like if someone type command "!user 123456" then send message "number banned" I tried this but won't worked... $ban = array('112233','123456'); if(strpos($message, "!user $ban") ===0){ sendMessage($chatId, "Number Banned!", $message_id); }
Wiker Bem
  • 29
  • 3
1
vote
1 answer

sendphotoasync() from hard drive

It would be more convenient for me to use the file from a computer, rather than download it from a specific link. How i can send a picture from hard driver with using sendphotoasync in Telegram.Bot? using System; using Telegram.Bot; using…
1
vote
1 answer

Doesn't return profile photo

print(update.message.bot.get_user_profile_photos(update.effective_user.id, 0)) When a chat with a bot is open, it returns a profile photo, otherwise it returns {'total_count': 0, 'photos': []}. Is it possible to make the profile photo always…
1
vote
0 answers

api script for multi account adder telegram

Hi I'm working on a multi add telegram member and here is the code: ffrom telethon.sync import TelegramClient from telethon.tl.functions.messages import GetDialogsRequest from telethon.tl.types import InputPeerEmpty import csv api_id = 5961821 …
1
vote
2 answers

how to set a globale variable in google script?

when i execute the program i receive variable (Fx_row: lign 6) undefined, i declare it in ligne 23, can u help me to resolve it , sorry for my english. if (contents.callback_query) { var id_callback = contents.callback_query.from.id; var data =…
1
vote
2 answers

Telegram bot get chat informations python

about telegram bots , how can I get json information from a special chat (not all chats , by chat ID) by url like getupdates (https://api.telegram.org/bot/getupdates) . because I get little information from getupdates I want to know some info like…
SyHoMadara
  • 33
  • 1
  • 4
1
vote
1 answer

Telegram Python Bot Inline Menu and Dictionary

Click Here to see the flowchart I need some help with my Telegram bot. I am trying to create a bot that will allow me to modify a selected set of dictionary values and display the dictionary key and values in a certain way at the end of it. As shown…
1
vote
0 answers

How to deploy multiple telegrambot using a single heroku application

I was wondering how to deploy multiple telegram bot on a single Heroku application. I have tried to deploy two telegram bot on a single Heroku app by using python oop (bot class) and each bot was initiated using threading. I also used webhook to…
1
vote
1 answer

save local data fulfillment dialogflow nodejs

when I use dialogflow + google assistant, I usually save a temporary data with conv.data and save to user storage with conv.user.storage in webhook cloud function javascript but, when I use dialogflow + telegram, I didn't find that. so I want to…
1
vote
0 answers

Invalid or Unexpected Token

I'm trying to set u a telegram bot whereby when someone makes a post on facebook, the post will be sent to telegram as well. Is there anything wrong with this code in general? I keep getting invalid or unexpected or token even after I have the…
Ian Pey
  • 11
  • 2
1
vote
1 answer

Get poll's results and user selections from Telegram's bot API

I would like to know if there is a way to find user's replies to a non anonymous poll, using bot API. I'm able to get the number of votes, but I would like to know the actual choice from a specific user.
Gello
  • 125
  • 1
  • 4
1
vote
0 answers

telegram-bot, Proximity alert on a street car?

I live in the KC area, the KC streetcar, and busses have GPS on them, and you can view it publicly. I am wanting to know, before I dive into this, if I am able to use telegram bot live location on parsed gps coordinates of the streetcar and use…
andyADD
  • 610
  • 1
  • 6
  • 20
1 2 3
99
100