telegram

How do I stop receiving hashtags as links from Twitter?

喜欢而已 提交于 2019-12-11 16:21:12
问题 I wanted a Twitter forwarder to Telegram. I found this one: https://github.com/franciscod/telegram-twitter-forwarder-bot The problem is now, that if a tweet contains a hashtag before a link, Telegram show me the link to the hashtag. I tried different things and searched about that, but I don't know how to only receive plain text from twitter. Also I don't get the short link t.co if the tweet is to long. It's just a long link. for tweet in tweets: self.logger.debug("- Got tweet: {}".format

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

Is there any way to stop Telegram from showing pages from my site as Instant View version?

不羁岁月 提交于 2019-12-11 09:08:23
问题 I run a blog and distribute my posts in a Telegram channel. One day, I got surprised that links started showing as "Instant View" versions, since I never managed to support this technology (and, tbh, I don't like it either). Later, I discovered that readers that I don't know submitted IV templates to Telegram, and eventually one of them was approved. I searched for any way to stop Telegram converting my posts into IV version, without success. Is there any (a meta tag, a form, whatever) to ask

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

How I can add users in Telegram channels using TLSharp?

不想你离开。 提交于 2019-12-11 06:14:28
问题 I know how to create a new channel using TLSharp, but how I can add users to this channel? 回答1: var contacts = new TLVector<TLInputPhoneContact>(); contacts.lists.Add(new TLInputPhoneContact { first_name = "xxx", last_name = "xxx", phone = "xxx" }); var req = new TLRequestImportContacts() { contacts = contacts }; var contact = client.SendRequestAsync<TLImportedContacts>(req).GetAwaiter().GetResult(); 回答2: replace SendRequestAsync with client.SendRequestAsync so : public async Task<TLUpdates>

How to send message with @ID telegram using telethon library

跟風遠走 提交于 2019-12-11 05:22:26
问题 I want send message with telethon but i dont have phone number this . i have only @username Telegram. with this code i can send message for my contact phone : result = client.invoke(ImportContactsRequest([contact], replace=True)) contacts = client.invoke(GetContactsRequest("")) for u in result.users: client.send_message(u, 'Hi') But i want send message to @username Telegram 回答1: You can just do the following now: client.send_message('username', 'hello') Old answer: It's on the Project's wiki,

How to remove an image from a telegram group

a 夏天 提交于 2019-12-11 04:48:05
问题 I sent an image to a telegram group and I want to delete it. but I already delete it for myself. is there any way to delete it for all other members? I am not admin 回答1: You need to check Delete for all members when delete message, or you might not able to do this. BTW, if you mean Supergroup, always delete for all members. 来源: https://stackoverflow.com/questions/45003453/how-to-remove-an-image-from-a-telegram-group

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