telegram

Add user to channel automatically when user asks

给你一囗甜甜゛ 提交于 2019-12-21 22:10:26
问题 I want to make a very simple project that does this: An user (let's call him John) opens a Telegram chat with my bot, and inputs this: User John: /join channel1 My bot responds adding user 'John' to Channel 'channel1' That's actually all I want. The problem is that Telegram BOT API does not implement any method to add users to groups. I tried to use telegram-cli but 'chat_add_user' only seems to accept adding user to chats, not to groups. Is there any way I can add an user to a channel like

Telegram Bot sendPhoto via node.js

↘锁芯ラ 提交于 2019-12-21 20:36:47
问题 i'm using this function for sending photo via node.js but that not work. telegram-bot-api https://www.npmjs.com/package/telegram-bot-api var telegram = require('telegram-bot-api'); var api = new telegram({ token: '<PUT YOUR TOKEN HERE>', }); api.sendPhoto({ chat_id: <YOUR CHAT ID>, caption: 'This is my test image', // you can also send file_id here as string (as described in telegram bot api documentation) photo: '/path/to/file/test.jpg' }) .then(function(data) { console.log(util.inspect(data

Telegram BOT Api: how to send a photo using PHP?

孤街醉人 提交于 2019-12-20 09:24:20
问题 The sendPhoto command require an argument photo defined as InputFile or String . The API doc tells: Photo to send. You can either pass a file_id as String to resend a photo that is already on the Telegram servers, or upload a new photo using multipart/form-data. And InputFile This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser. So I tried this method $bot_url = "https://api.telegram.org

How to find out whether it's user's current location or a chosen spot on map

若如初见. 提交于 2019-12-19 10:07:29
问题 I need to get user's current location. I can ask for location by location keyboard and user will send his current location clicking on it. But he can also reply to message, choose any location on map and share it. Either way, the returned results to my Bot are identical.(At least as I see.) Is there a way or a trick to make sure that the shared location is also his current? FYI - I'm using TeleBot library written in Node.js.(Even though I don't think it will affect the answer.) 回答1: My

How to get Telegram channel users list with Telegram Bot API

本秂侑毒 提交于 2019-12-18 12:27:51
问题 Anybody give a starter on how may I get information about users from my telegram bot. Imagine my bot in an admin user in my channel and I want to get my channel user list or to be noticed when a new user joins. How can I do that. Telegram's documents are so unorganized. So far I have looked at these: https://core.telegram.org/bots https://core.telegram.org/bots/api https://core.telegram.org/bots/samples https://core.telegram.org/bots/faq But none of these really helps. 回答1: In order to get

Telegram Bot Event When Users Join To Channel

徘徊边缘 提交于 2019-12-18 11:55:34
问题 After create telegram bot, access and admin this bot to channel. how to get channel members list or event when users join to this channel? 回答1: Pretty disappointed with the current answers, so I'll leave an updated (as of February 2018) answer that explains how to do this with the Telegram API itself, as well as with the framework I am using, Telegraf for Node. The Telegram API is both very powerful, and pretty simple as far as API's go. If you are using the polling method of getting updates,

How to interact with Telegram API

风流意气都作罢 提交于 2019-12-18 10:04:47
问题 I'm really confused as I'm trying to use Telegram's APIs after reading a lot of the documentation on http://core.telegram.org. I have registered my app and got a hash_id and all of that stuff. But I'm not sure where to begin with. I had worked with Spotify's API before, and was able to interact with it using http://api.spotify.com/v1/method?params:values form. I can't find the URL for Telegram's API. I also searched a lot on the internet but couldn't find any useful examples. Does anyone know

How to open specific contact chat screen in various popular chat/social-networks apps?

北战南征 提交于 2019-12-17 10:32:32
问题 Background I've found that there is a way to open a specific contact conversation screen on WhatsApp, here . Not only that, but I've found that an app called "Drupe" does the same, and maybe even more : https://lh3.googleusercontent.com/EQrs1jplMlP8SkOTdpqT4NzmgzGa5Wz2qageG1Pkjc6rKg0HBb-rwlOVW07_G7bAWgo=h900 The problem I can't find any official API of opening it this way, so I'm not sure how safe it is. I've found SDKs, but not intents instructions. The questions I'd like to know more about

How to open specific contact chat screen in various popular chat/social-networks apps?

孤人 提交于 2019-12-17 10:32:19
问题 Background I've found that there is a way to open a specific contact conversation screen on WhatsApp, here . Not only that, but I've found that an app called "Drupe" does the same, and maybe even more : https://lh3.googleusercontent.com/EQrs1jplMlP8SkOTdpqT4NzmgzGa5Wz2qageG1Pkjc6rKg0HBb-rwlOVW07_G7bAWgo=h900 The problem I can't find any official API of opening it this way, so I'm not sure how safe it is. I've found SDKs, but not intents instructions. The questions I'd like to know more about

how can i join two users in a telegram chat bot?

柔情痞子 提交于 2019-12-13 12:23:28
问题 I am going to make a telegram bot in Python 3 which is a random chat bot. As I am new in telegram bots, I don't know how to join two different people in a chat bot. Is there a guide available for this? 回答1: You need to make a database with chatID as primary column. and another column as partner. which stores his/her chat partner chatID. now when a user sends a message to you bot you just need to check the database for that user and send the message to her chat partner. after the chat is done