telegram-bot

how to convert jpg to webp in C#

假如想象 提交于 2019-12-11 12:45:18
问题 I'm writing a telegram bot that takes jpg from it's users and sends it back as stickers. I did this correctly by downloading jpg, change the extension of file to png and upload and send it back as a sticker message to the user. as shown below: var file = await bot.GetFileAsync(update.Message.Photo.LastOrDefault()?.FileId); var filename = file.FileId + "." + file.FilePath.Split('.').Last(); var pngFileName = filename.Split('.')[0] + ".png"; using (var saveImageStream = System.IO.File.Open

Laravel Check the User Share Telegram Bot Link to other Users

天涯浪子 提交于 2019-12-11 08:52:41
问题 Hi i want to develop the bot , but first i ask users to share the link of my bot to 5 other users then continue and register in my bot , i develop all sections but i cannot handle the first one, how can i detect that the use send share link to other user ? i user laravel + talageram bot SDK to develop my bot. i just want to know that user share the link and continue , i search in many docs and site bud i cannot find anythings that useful to me. please help me to handle this problem in my

How to send python output to telegram CHANNEL not to Group and gmail email group

走远了吗. 提交于 2019-12-11 07:57:49
问题 Hi I have a program in python that generates results every one hour. The result can be of anything.This program will run in local machine or in the virtual private network. I have two requirements 1. Send this python generated result to one telegram group [Group name "ourworld"](created by me) automatically without user intervention . (I have desktop telegram client running or web.telegram.org running in the same system) Send this result to gmail group email ID. what are the methods available

How do you remove reply keyboard without sending a message in Telegram?

冷暖自知 提交于 2019-12-11 07:29:06
问题 In Telegram bot you can send a message with the reply keyboard using the sendMessage method. The keyboard is getting displayed instead of normal qwerty one. We can remove the displayed keyboard by sending another message and by passing ReplyKeyboardRemove object with it. However, this requires some extraneous message to be sent. Is it possible to remove the keyboard without actually sending any real message? I'm aware of one_time_keyboard option, but it will only hide the keyboard without

Visual indication for inline buttons

微笑、不失礼 提交于 2019-12-11 04:27:56
问题 Is there a way to show some visual indication that the inline button has been pressed in telegram bot. I have a bit which send inline keyboard, and when I press each buttons it works perfectly fine, but there is a slight delay in getting response from the server. As there is no visual indication to show if a button has been pressed, it is confusing for uses to know if the button was pressed and end up pressing the same button several times. 回答1: there are different types of inline buttons in

telegram botfather doesn't allow making more bots

泪湿孤枕 提交于 2019-12-11 02:05:49
问题 I'm trying to make telegram bot .I have made 20 bot so far and now when I select newbot from bot father it says this : " That I cannot do. You come to me asking for more than 20 bots. But you don't ask with respect. You don't offer friendship. You don't even think to call me Botfather" How Should I make more bots?? Thanks 回答1: It already said that you can't create more bot with this account. There is no way to do that except delete useless one. You might want to create bot via your friends'

Upload file on Telegram with bot

白昼怎懂夜的黑 提交于 2019-12-11 01:47:01
问题 I want to send file from URL to user with Telegram Bots, My files extension in .attheme but I can't upload this files from Url. Currently I can upload .zip , .pdf , but i want upload a .attheme file from PHP code. This bot can upload any type of files into Telegram: @uploadbot How can I do this ? 回答1: Sending a file by URL only works for certaining file types. If you want to upload other types of files you will have to post the file, after saving it on your own server, using multipart/form

Create telegram auth_key

青春壹個敷衍的年華 提交于 2019-12-10 16:27:38
问题 I've recently started to work with the telegram api. In the first stage, I made a request to receive auth_key . This is my c# code : // auth_key_id in unencrypted message is ZERO Int64 auth_key_id = 0; // this is current time stamp that used as message id Int64 message_id = DateTime.Now.Ticks; // message type for req_pq is 0x60469778 in big-ending format byte[] message_type = {120, 151, 70, 96}; // this is data lenght, it determind in run time Int32 data_lenght; // data is combined message

How to know if user has seen a message sent by my bot in Telegram?

笑着哭i 提交于 2019-12-10 13:42:56
问题 I'm developing a Telegram bot, and I want to know whether a user, that has started a private chat with my bot, has seen a certain message sent by bot, and to know when has he seen it. Is it possible to do so? Thank you very much. 回答1: That's currently not possible. 回答2: I'm using this solution. Create a channel specially for your bot Let your robot send message from this channel to users, you can use forward method. Now you can see how many users have seen your message 回答3: perhaps this

Telegram Bot Game not working

筅森魡賤 提交于 2019-12-10 11:55:13
问题 I am realizing my bot telegram with a game. I wrote this: $content = file_get_contents("php://input"); $update = json_decode($content, true); if(!$update) { exit; } $chatId = isset($message['chat']['id']) ? $message['chat']['id'] : ""; header("Content-Type: application/json"); $parameters = array('chat_id' => $chatId); $parameters["method"] = "sendGame"; $parameters["game_short_name"] = "prova"; $parameters["text"] = parse_url("<my_html_5_url>"); $message = json_encode($parameters); echo json