telegram-bot

How can a Telegram Bot figure out that user has opened the chat window?

可紊 提交于 2019-12-07 16:06:27
问题 How can a bot send a message to the user, when user just opens the chat. Example: User has already added a Telegram bot to his list of contacts and started conversation Later on, user opens the chat window with that bot Bot "sees" that user has opened the chat window, but hasn't written anything yet Bot should say "hello, what can I help you with?" to the user Is there any event/trigger for a step #3 in Telegram Bot API? 回答1: No. There is no trigger for each time user opens the chat window

How to send big files from URL to Telegram bot?

余生颓废 提交于 2019-12-07 15:50:25
问题 I have some big size files (in MP4 and Zip formats) and I want to send them to my chat by Telegram bot, I used the code below: file_get_contents('https://api.telegram.org/bot[[app:token]]/sendDocument?chat_id=24523586&document='.$fileAddress); But it just can send files with small sizes, less than 50MB! But I know there is no file size limitation for documents which are sending by file_id . You can see this page Now how can I make file_id for my files? My files are uploaded on my server and I

Chat API to add and remove members automatically [closed]

时光毁灭记忆、已成空白 提交于 2019-12-07 13:06:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 months ago . I'm working with a guy who uses telegram app to send bet tips on football matches. He wants the group to be private, right now he is adding and removing all members manually. The group is growing and now has more than 300 members which makes his job harder, what he wants is an automatic way of adding and

Create new group using telegram bot API

拥有回忆 提交于 2019-12-07 05:34:39
问题 How can I create new groups using a bot in Telegram? As far as I know a bot cannot do this itself, so is it possible to implement a bot as a regular user ? How? Update : This is what I want http://t.me/polyglossia 回答1: As I know this is impossible according to the latest telegram bot api and its documentation that can be find here. Bots cannot create channels, groups and super groups they can only be added to groups or channel as administrator manually by human users. 回答2: I myself don't use

Telegram bot api keyboard

孤人 提交于 2019-12-07 02:50:40
问题 I have problem with Telegram Bot Api and with "ReplyKeyboard". I'm using Python 2.7 and I send post request: TelegramAPI.post(TELEGRAM_URL + "sendMessage", data=dict(chat_id=CHAT_ID, text="", keyboard={'keyboard': keyboard, 'one_time_keyboard': False, 'resize_keyboard': True}) keyboard in this format: [["A button"], ["B button"]] But in Telegram I don't see keyboard. What problem can be? 回答1: According to the Bot API documentations, a custom keyboard requires a reply_markup parameter, whose

firebase.intializeApp is not a function

喜夏-厌秋 提交于 2019-12-07 01:19:51
问题 so im stuck at this error. Im making a telegram bot with the telegram bot api and now im trying to set up a firebae DB to save the score of a group member - so the score is not resetted after restarting the bot. can someone tell me what the problem is? i read a lot of other issues here with similiar problems, but none of these answers fixed my problem. bot.js var TelegramBot = require('node-telegram-bot-api'); var firebase = require('firebase'); var token = 'mytoken'; // Setup polling way var

How can I get messages from a Telegram channel with the Telegram API

自古美人都是妖i 提交于 2019-12-06 22:11:56
问题 How can I access to a Telegram channel messages with a bot registered as channel admin? I am trying to get all the messages from Telegram channel and display them in an ASP.NET webpage (c#) I am able to get updates when new message sent directly to the bot: var json = wc.DownloadString(" https://api.telegram.org/bot<token>/getUpdates"); but its not working for the channel. 回答1: unfortunately it's not possible yet.(they may come up with something in future) as admin you can just send messages

How can I send a message to someone with my telegram bot using their Username

假如想象 提交于 2019-12-06 19:30:14
问题 I am using the telepot python library, I know that you can send a message when you have someone's UserID(Which is a number). I wanna know if it is possible to send a message to someone without having their UserID but only with their username(The one which starts with '@'), Also if there is a way to convert a username to a UserID. 回答1: You can't send message to users using their username that is in form of @username , you can just send messages to channel usernames which your bot is

Get number of a link Shared or Clicked via telegram bot

喜夏-厌秋 提交于 2019-12-06 16:03:03
问题 I'm using node-telegram-bot-api module and I want to get number of a link shared by my users to their Friends. Users have a Share Status Button Is there a way to display number of a link Shared or Clicked by User's Friends in Share Status Button ? For example 1: John's Share Status Button : 5 // John Shared to 5 person or 5 person of John's Friends Clicked on that link 2: Maria's Share Status Button : 20 // Maria Shared to 20 person or 20 person of Maria's Friends Clicked on that link . . Is

telegram bot - keep questions and answers

拥有回忆 提交于 2019-12-06 13:01:55
问题 My telegram bot is a dialog and it needs to keep the questions and the answers (like TriviaBot). What is the best (most efficient) method to do this? A database with the user id as key? There is a lot of telegram bots, but where are examples with the source code to get ideas? 回答1: Your question is not really related to the telegram bot API. You are essentially asking: I have an application that has to keep an history of user interactions, how to do this (efficient)? To answer that: you could