telegram

How can i create a private message from telegram bot?

我与影子孤独终老i 提交于 2021-02-19 06:36:31
问题 I'm connecting to telegram bot with webhook and i wanted to respond in private chat through telegram but if i send UID it doesn't send any message to the user from the bot. this is what i did. I created a Web API Project with .net framework to connect to webhook with telegram bot. As a user, i wrote a command that will return some list of objects. From the WebAPI i got the command and processed correctly on sending response back i passed this {"method":"sendMessage","chat_id":"[user's UID who

Automatically make changes to a github file

家住魔仙堡 提交于 2021-02-18 18:13:04
问题 I’ve Made an app whith a whitelist, the withelist is on a github repo ( with just one file that is the withelist ), Each time that a user that downloads my app want to be allowed to use the app has to send me a message for be inserted in the white list. Right now this process is really slow and I want to speed it up but I’m trying to figure out how. I’m sesrching a way for Let the users send me a message Read the message ( with a bot or something that automate this process ) Make the bot add

Automatically make changes to a github file

痴心易碎 提交于 2021-02-18 18:11:44
问题 I’ve Made an app whith a whitelist, the withelist is on a github repo ( with just one file that is the withelist ), Each time that a user that downloads my app want to be allowed to use the app has to send me a message for be inserted in the white list. Right now this process is really slow and I want to speed it up but I’m trying to figure out how. I’m sesrching a way for Let the users send me a message Read the message ( with a bot or something that automate this process ) Make the bot add

IM群聊消息的已读回执功能该怎么实现?

懵懂的女人 提交于 2021-02-15 02:33:41
本文引用了架构师之路公众号作者沈剑的文章,内容有改动,感谢原作者。 1、前言 我们平时在使用即时通讯应用时候,每当发出一条聊天消息,都希望对方尽快看到,并尽快回复,但对方到底有没有真的看到?我却并不知道。 一个残酷的现实是,很多时候对方其实是早就已经看到了这条消息,但出出种种原因(大家都懂的),通常都是默默返回——假装没看见。 像微信这样的熟人社交工具,在产品的设计理念上,为了保持使用者的隐私性,在线状态、已读回执等涉及隐私的功能,都没有提供。但很多时候,尤其商务、办公场合下,特别需要一种强反馈的工具,这对于打造高效的团队很有帮助(虽然员工很反感,但老板都喜欢这样的功能,哈哈)。 目前市面上主流的移动端IM里,提供了已读回执的主要有阿里的钉钉、网易的易信、阿里的旺旺,如下图所示: ▲ 上图从左至右分别为:钉钉、易信、旺旺(千牛) 以阿里的钉钉为例,钉钉的产品定位是用于商务交流,其“强制已读回执”功能,让职场人无法再“假装不在线”、“假装没收到”。更有甚者,钉钉的群聊“强制已读回执”功能,甚至能够知道谁读了消息,谁没有读消息(老板的福音啊)。 那么群聊消息的收发流程、消息的送达保证、已读回执机制,到底该怎么实现呢?这就是今天要讨论的话题。 学习交流: - 即时通讯开发交流3群: 185926912 [推荐] - 移动端IM开发入门文章:《 新手入门一篇就够:从零开发移动端IM 》

Pretending that telegram bot is typing?

自闭症网瘾萝莉.ら 提交于 2021-02-11 14:12:09
问题 How can I make a bot to pretend that it is typing a message? The following text appears in the chat when the bot pretend to type: I use the python aiogram framework but a suggestion for the native Telegram API would be also helpful. 回答1: I seriously suggest using the python-telegram-bot library which has an extensive Wiki. The solution for what you want is described in code snippets. You can manually send the action: bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING) Or

How can I include the Telegram login widget in an Angular app?

对着背影说爱祢 提交于 2021-02-10 17:50:41
问题 I want to include the Telegram login widget in my Angular application. For this, you have to include the following script: <script async src="https://telegram.org/js/telegram-widget.js?5" data-telegram-login="bot_name" data-size="large" data-auth-url="https://myurl.example/api/telegram" data-request-access="write"></script> Embedding scripts in Angular templates is not allowed, it will just be removed. (However, it is possible to include a script tag via this hack.) Is there a non-hacky way

Is there a better way with NodeJs to get updates from a Telegram bot?

*爱你&永不变心* 提交于 2021-02-10 17:29:50
问题 I'm using simply like below: class Bot { constructor(token) { let _baseApiURL = `https://api.telegram.org`; //code here } getAPI(apiName) { return axios.get(`${this.getApiURL()}/${apiName}`); } getApiURL() { return `${this.getBaseApiUrl()}/bot${this.getToken()}`; } getUpdates(fn) { this.getAPI('getUpdates') .then(res => { this.storeUpdates(res.data); fn(res.data); setTimeout(() => { this.getUpdates(fn); }, 1000); }) .catch(err => { console.log('::: ERROR :::', err); }); } } const bot = new

Is there a better way with NodeJs to get updates from a Telegram bot?

夙愿已清 提交于 2021-02-10 17:28:43
问题 I'm using simply like below: class Bot { constructor(token) { let _baseApiURL = `https://api.telegram.org`; //code here } getAPI(apiName) { return axios.get(`${this.getApiURL()}/${apiName}`); } getApiURL() { return `${this.getBaseApiUrl()}/bot${this.getToken()}`; } getUpdates(fn) { this.getAPI('getUpdates') .then(res => { this.storeUpdates(res.data); fn(res.data); setTimeout(() => { this.getUpdates(fn); }, 1000); }) .catch(err => { console.log('::: ERROR :::', err); }); } } const bot = new

Is there a better way with NodeJs to get updates from a Telegram bot?

孤人 提交于 2021-02-10 17:28:41
问题 I'm using simply like below: class Bot { constructor(token) { let _baseApiURL = `https://api.telegram.org`; //code here } getAPI(apiName) { return axios.get(`${this.getApiURL()}/${apiName}`); } getApiURL() { return `${this.getBaseApiUrl()}/bot${this.getToken()}`; } getUpdates(fn) { this.getAPI('getUpdates') .then(res => { this.storeUpdates(res.data); fn(res.data); setTimeout(() => { this.getUpdates(fn); }, 1000); }) .catch(err => { console.log('::: ERROR :::', err); }); } } const bot = new

Is there a better way with NodeJs to get updates from a Telegram bot?

你说的曾经没有我的故事 提交于 2021-02-10 17:27:53
问题 I'm using simply like below: class Bot { constructor(token) { let _baseApiURL = `https://api.telegram.org`; //code here } getAPI(apiName) { return axios.get(`${this.getApiURL()}/${apiName}`); } getApiURL() { return `${this.getBaseApiUrl()}/bot${this.getToken()}`; } getUpdates(fn) { this.getAPI('getUpdates') .then(res => { this.storeUpdates(res.data); fn(res.data); setTimeout(() => { this.getUpdates(fn); }, 1000); }) .catch(err => { console.log('::: ERROR :::', err); }); } } const bot = new