telegram

Telegram API send messages with php or javascript? [closed]

淺唱寂寞╮ 提交于 2019-12-13 05:00:43
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . How can I send messages to users via their number? I saw this site http://notificatio.divshot.io/ , but there is no way to delete its references in the messages. 回答1: You can make use of the Telegram Bot API, it is an easy to use HTTP interface to the Telegram service. Use their

G.A.S. code to email a google sheet as a pdf file to a person through Telegram

泄露秘密 提交于 2019-12-13 04:01:29
问题 I use the following Google Script Code to generate a pdf of a google sheet and send it through email. Is there a way I can send the pdf through teleram to a person? How should I change the following code to send the pdf through telegram? function emailReport() { readyForExport(); var spreadsheet = SpreadsheetApp.getActive(); var subject = spreadsheet.getRange("U1:U1").getValues(); var emailTo = spreadsheet.getRange("V1:V1").getValues(); var message = spreadsheet.getRange("W1:W1").getValues();

Commands not recognised in php-telegram-bot on a laravel Project

孤者浪人 提交于 2019-12-13 03:50:48
问题 I'm using php-telegram-bot/core in larvel 5.5 to make a telegram bot. I followed all installation and add custom commands described here. First in the web.php route file I added this : Route::get('/setwebhook', 'BotController@setWebhook'); Route::post('/webhook', ['as' => 'webhook', 'uses' => 'BotController@Webhook']); and this is BotController structure : namespace App\Http\Controllers; use Illuminate\Support\Facades\Log; use Longman\TelegramBot\Request; class BotController extends

How to solve a error with callback_data or method in PHP

天大地大妈咪最大 提交于 2019-12-13 03:18:51
问题 The idea is to have some buttons to do something, I got the following code, and something is wrong with the method (sendMessage) or callback_data because I received a undefined index error in all the rows where is the $message, if I use a url instead of a call back data works fine I use a webhook <?php $botToken = "TOKEN"; $website = "https://api.telegram.org/bot".$botToken; $update = file_get_contents('php://input'); $update = json_decode($update, TRUE); $chatId = $update["message"]["chat"][

Simulate sending a message to a bot from url

雨燕双飞 提交于 2019-12-13 02:56:14
问题 I'm trying to simulate how to send a message to a bot from a url but it doesn't work. I try to explain (note: all the ids and tokens are not real, they are only to explain !!) .. I've built a first bot from BotFather named Bot1Bot and then, form url if I try https://api.telegram.org/bot532708503:BBGn5ORfLppFu05-bi088F4SyKAiITfXH1w/getme the response is {"ok":true,"result":{"id":532708503,"is_bot":true,"first_name":"Bot1Bot","username":"Bot1Bot"}} Then I've built a second bot from BotFather

What are Telegram Client Messaging limits?

旧城冷巷雨未停 提交于 2019-12-13 02:26:38
问题 From here I know that Telgram limits BOT messages like this: > 1msg/second per chat > 30msg/second different chats Happens that I'am not using the python-telegram-bot API, I'am using a normal client through telethon's library. I'am getting Flood\Spam error from Telegram when trying to send messages in that cadence. BTW, I'am using delayQueue Class to control the messages limits like this: dqueue = DelayQueue(burst_limit=29, time_limit_ms=1014) dqueue(client.send_message,inputPeerUser,msg)

How to send emoji via bash script to Telegram bot using curl?

守給你的承諾、 提交于 2019-12-12 21:05:35
问题 I'm trying to send an emoji/emoticon to my Telegram bot using a bash script. This bash script calls the Telegram API as follows: curl -s -X POST 'https://api.telegram.org/'$API'/sendMessage' -F chat_id=$chat -F text=$text Since the bash script isn't unicode, I cannot simply copy/paste the emojis from the web. Therefore I tried using the UTF-8 emoji variants, but the backslash character keeps getting escaped. The expected json output should be as follows: "text":"\ud83d\udd14" Instead, this is

How to read messages from Telegram group with bot?

两盒软妹~` 提交于 2019-12-12 18:08:24
问题 I would like to connect a simple telegram bot to read messages from a group, (where I'm not admin). I already added the bot to the group, but it doesn't work. Here is the code I have in Python: import telepot from pprint import pprint import time from telepot.loop import MessageLoop key = "MY API" bot = telepot.Bot(key) def handle(msg): pprint(msg) bot.message_loop(handle) while 1: time.sleep(10) If I open the chat (of the bot) and write a message, everything works well. But when someone send

Telegram bot inline keyboard via Node.JS

喜你入骨 提交于 2019-12-12 10:19:45
问题 I'm using the node-telegram-bot-api module, How can I make my keyboard to inline Keyboard? This is my code: bot.onText(/^\/start$/, function (msg) { const opts = { reply_to_message_id: msg.message_id, reply_markup: { resize_keyboard: true, one_time_keyboard: true, keyboard: [ ['Level 1'] ] } }; bot.sendMessage(msg.chat.id, "I'm a test robot", opts); }); 回答1: I answered a question similar to this link: How can create menu for telegram bot in bot father? in your case you could use: keyboard: [[

How to show telegram bot inline keyboard button with safe url

不打扰是莪最后的温柔 提交于 2019-12-12 09:21:58
问题 I have the following code: inline_keyboard: [ [{ text: 'Authorize', callback_data: '1', url: 'https://google.com' }], ], When I press the button that comes out this code, the resulting url is modified to: tg://unsafe_url?url=https%3A%2F%2Fgoogle.com%2F Then, when the user presses the button, a confirmation modal appears. I've seen other bots with url buttons that don't have that confirmation button. For example https://ifttt.com connects with telegram and has buttons that I guess are safe.