telegrambotsapi / telegram.bots Goto Github PK
View Code? Open in Web Editor NEWA .NET Standard 2.1 wrapper for the Telegram Bot API 6.2.
Home Page: https://telegrambots.gitbook.io
License: GNU Lesser General Public License v3.0
A .NET Standard 2.1 wrapper for the Telegram Bot API 6.2.
Home Page: https://telegrambots.gitbook.io
License: GNU Lesser General Public License v3.0
When i trying to send photo with MemoryStream I get this:
Send Telegram photo {"ChatId":304667397, "Photo":{"Id":"79d1d33d-f54b-48a1-b337-b557622baad5", "Data":"System.IO.MemoryStream"}, "Method":"sendPhoto"} and get response {"Failure":{"Description":"Bad Request: file must be non-empty", "ErrorCode":400}, "Ok":false}.
Data is just use MemoryStream.ToString()?
Can you help me?
Hello
Please help me configure for ASP.NET Core MVC
Unfortunately, the available information is common
I'm building a little app to share photos from Flickr to a Telegram channel. As part of that, I'd like to link back to the original photo in the caption.
I can easily drop a link in there and that works fine, but ideally I'd like to have it look nicer, by e.g. having something like View the original on Flickr! instead of just the URL.
Going by the Telegram docs, what I need is a message entity of type "textUrl". The value is present on the MessageEntity
enum, but I can't find a way to add the fourth parameter (the URL) onto the message entity. Any advice? 🙏
The code I'm using looks like follows:
var caption = $"{photoToPost.Title}\n\nView original on Flickr";
var request = new SendPhotoUrl(_options.TargetChatId, photoToPost.PhotoUrl, UriKind.Absolute))
{
Caption = caption,
CaptionEntities = new List<MessageEntity>
{
new MessageEntity(MessageEntityType.Bold, 0, (uint)photoToPost.Title.Length),
// this no worky:
new MessageEntity(MessageEntityType.TextLink, (uint)photoToPost.Title.Length, 23, photoToPost.WebUrl), // no parameter for URL available.
}
};
return await _botClient.HandleAsync(request);
Consider changing int to TimeSpan?
In my country, I need a WebProxy to access telegram, can you add HttpClientHandler Support?
Can u please provide details on getting updates
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.