![]() ![]() Netcoreapp2.0 netcoreapp2.0 was computed. net7.0-windows net7.0-windows was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-android net7.0-android was computed. net6.0-windows net6.0-windows was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-android net6.0-android was computed. net5.0-windows net5.0-windows was computed. Versions Compatible and additional computed target framework versions. If you like this library, please consider a donation.❤ This will help the project keep going. Respect Telegram Terms of Service as well as the API Terms of Service or you might get banned from Telegram servers.ĭevelopers feedbacks are welcome in the Telegram support group can also check our □ Frequently Asked Questions for more help and troubleshooting guide. Please don't use this library for Spam or Scam. Secret chats (end-to-end encryption, PFS) and connection to CDN DCs have not been tested yet. It has been tested in a Console app, WinForms app, ASP.NET webservice. or even a full-featured interactive client.Real-time monitoring of incoming Updates/Messages.Sequential or parallel automated steps based on API requests/responses.This library can be used for any Telegram scenarios including: NET Core 2.0+) Library uses and limitations NET Standard 2.0 (.NET Framework 4.6.1+ &. I've added several useful converters, implicit cast or helper properties to various API object so that they are more easy to manipulate.īeyond the TL async methods, the Client class offers a few other methods to simplify the sending/receiving of files, medias or messages. Required API parameters/fields can sometimes be set to 0 or null when unused (check API documentation or experiment). Passing null for a required string/array is the same as empty (0-length). Optional API parameters have a default value of null when unset. The other configuration items that you can override include: session_pathname, server_address, device_model, system_version, app_version, system_lang_code, lang_pack, lang_code, user_id See Examples/Program_ListenUpdates.csĪn invalid API request can result in a RpcException being raised, reflecting the error code and status text of the problem. The Client class also offers an Update event that is triggered when Telegram servers sends unsollicited Updates or notifications/information/status/service messages, independently of your API requests. Access Hash : Telegram requires you to provide a specific access_hash for users, channels, and other resources before interacting with them.DC (DataCenter) : There are a few datacenters depending on where in the world the user (or an uploaded media file) is from.Dialog : The current status of a chat with a Peer (draft, last message, unread count, pinned.).Peer : Either a Chat, Channel or a private chat with a User.chats : In plural or general meaning, it means either Chat or Channel.⚠ Most chat groups you see are really of type Channel not Chat! Chat : A private simple chat group with less than 200 members (it may be migrated to a supergroup Channel with a new ID when it gets bigger or public, in which case the old Chat will still exist but be deactivated).Channel : A (large or public) chat group (sometimes called supergroup) or a broadcast channel (the broadcast flag differenciate those).In the API, Telegram uses some terms/classnames that can be confusing as they differ from the terms shown to end-users: ➡️ You can find more useful code snippets in EXAMPLES.md and in the Examples subdirectory. Var user = await client.LoginUserIfNeeded() Ĭonsole.WriteLine($"We are logged-in as ") Īwait client.SendMessageAsync(target, "Hello, World") ![]() Using var client = new WTelegram.Client() If you are a beginner in C#, starting a project based on this library might not be a great idea.Īfter installing WTelegramClient through Nuget, your first Console program will be as simple as: static async Task Main(string _) ⚠️ This library relies on asynchronous C# programming ( async/await) so make sure you are familiar with this advanced topic before proceeding. A Telegram Client API library written 100% in C# and. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |