telegram-bot

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

Show message in specified time

元气小坏坏 提交于 2021-02-11 12:56:57
问题 I am making a telegram C# bot and I want my bot lock group and I use timespan for this and its work but I want exactly five minutes before lock group shows a message for users but my bot didn't send any messages automatically. I am so beginner and didn't find any thing online for help. Thank you for your help. TimeSpan Start = new TimeSpan(20,0,0); TimeSpan End = new TimeSpan(21,0,0); TimeSpan now = DateTime.Now.TimeOfDay; TimeSpan risingStart1 = new TimeSpan(19, 55, 0); if (now ==

How to add URL to InlineKeyboardButton for Telegram Bot

此生再无相见时 提交于 2021-02-10 18:10:32
问题 I would like to make the button that will open URL (external hyperlink) in browser from Telegram chat. Currently, I developed only clickable action buttons. update.message.reply_text( 'Subscribe to us on Facebook and Telegram:', reply_markup=InlineKeyboardMarkup([ [InlineKeyboardButton(text='on Facebook', callback_data='Facebook')], [InlineKeyboardButton(text='on Telegram', callback_data='Telegram')], ]) ) But how to make them as link (with arrow). I want to ask for users for sharing. 回答1:

How to add URL to InlineKeyboardButton for Telegram Bot

微笑、不失礼 提交于 2021-02-10 18:02:36
问题 I would like to make the button that will open URL (external hyperlink) in browser from Telegram chat. Currently, I developed only clickable action buttons. update.message.reply_text( 'Subscribe to us on Facebook and Telegram:', reply_markup=InlineKeyboardMarkup([ [InlineKeyboardButton(text='on Facebook', callback_data='Facebook')], [InlineKeyboardButton(text='on Telegram', callback_data='Telegram')], ]) ) But how to make them as link (with arrow). I want to ask for users for sharing. 回答1:

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