{"id":16715056,"url":"https://github.com/wiz0u/wtelegrambot","last_synced_at":"2025-09-08T19:39:37.809Z","repository":{"id":236946120,"uuid":"631257047","full_name":"wiz0u/WTelegramBot","owner":"wiz0u","description":"Telegram Bot API (local server) library providing more extended features","archived":false,"fork":false,"pushed_at":"2025-09-03T22:56:47.000Z","size":923,"stargazers_count":62,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-03T23:25:09.408Z","etag":null,"topics":["bot","bot-api","bot-api-server","csharp","dotnet","local-bot-api","mtproto","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/WTelegramBot","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiz0u.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"wiz0u","custom":["https://www.buymeacoffee.com/wizou","http://t.me/WTelegramBot?start=donate"]}},"created_at":"2023-04-22T12:50:36.000Z","updated_at":"2025-09-03T22:56:50.000Z","dependencies_parsed_at":"2024-10-27T11:51:05.828Z","dependency_job_id":"05a79267-3278-425c-8839-37ad6625822f","html_url":"https://github.com/wiz0u/WTelegramBot","commit_stats":null,"previous_names":["wiz0u/wtelegrambot"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/wiz0u/WTelegramBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiz0u%2FWTelegramBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiz0u%2FWTelegramBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiz0u%2FWTelegramBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiz0u%2FWTelegramBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiz0u","download_url":"https://codeload.github.com/wiz0u/WTelegramBot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiz0u%2FWTelegramBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231435,"owners_count":25245585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","bot-api","bot-api-server","csharp","dotnet","local-bot-api","mtproto","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots"],"created_at":"2024-10-12T21:08:14.912Z","updated_at":"2025-09-08T19:39:37.800Z","avatar_url":"https://github.com/wiz0u.png","language":"C#","funding_links":["https://github.com/sponsors/wiz0u","https://www.buymeacoffee.com/wizou","http://t.me/WTelegramBot?start=donate"],"categories":[],"sub_categories":[],"readme":"[![Bot API 9.2](https://img.shields.io/badge/Bot_API-9.2-blueviolet)](https://core.telegram.org/bots/api)\n[![NuGet version](https://img.shields.io/nuget/v/WTelegramBot?color=00508F)](https://www.nuget.org/packages/WTelegramBot/)\n[![NuGet prerelease](https://img.shields.io/nuget/vpre/WTelegramBot?color=C09030\u0026label=dev+nuget)](https://www.nuget.org/packages/WTelegramBot/absoluteLatest)\n[![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://www.buymeacoffee.com/wizou)\n\n# Powerful Telegram Bot API library for .NET\n\nWTelegramBot is a full rewrite in pure C# of Telegram Bot API server, presenting the same methods as the Telegram.Bot library for easy [migration](https://github.com/wiz0u/WTelegramBot/blob/master/CHANGES.md).\n\nThe library is built on top of [WTelegramClient](https://wiz0u.github.io/WTelegramClient) to connect directly to Telegram Client API and gives you additional control over your bot, updates and call methods normally impossible to use with Bot API.\n\n## Advantages of WTelegram.Bot\n\nUsing class `WTelegram.Bot` you have access to a clean set of developer-friendly methods to easily access the Bot API\n\nYou can also call Client API methods that are possible for bots but not accessible from Bot API!\nSome examples:\n- Fetch past messages of group/channel\n- Get group/channel members list\n- Resolve user/chat usernames\n- Get full details of users/chats\n- Send/receive big files\n- Connect using a MTProxy\n- Change the bot's profile picture\n\nYou also get access to raw Updates information from Client API, in addition to the usual Bot API updates.\nThey contain more information than the limited set of Bot API updates!\nSome examples:\n- Detect deletion of messages _(not always immediate)_\n- Get more info on message media _(like date of original media upload, sticker duration, ...)_\n- Notification when your messages were read in a group\n\nSee the [Example app](https://github.com/wiz0u/WTelegramBot/tree/master/Examples/ConsoleApp) for a nice demonstration of features.\n\n➡️ There are still a lot of restrictions to bots, even via Client API, so don't expect to be able to do many fancy things\n\n\u003ca name=\"migration\"\u003e\u003c/a\u003e\n## Difference between classes `WTelegram.Bot` and `TelegramBotClient`\n\nThe library contains a compatibility layer as `Telegram.Bot.WTelegramBotClient` inheriting from WTelegram.Bot.  \n[Click here to easily migrate](https://github.com/wiz0u/WTelegramBot/blob/master/CHANGES.md) your existing Telegram.Bot code.\n\nIf you're not migrating an existing codebase, it is recommended that you use `WTelegram.Bot` class directly.\nHere are the main differences:\n* The method names don't have the *Async suffix (even though they should still be invoked with `await`) so they are more close to official [Bot API method names](https://core.telegram.org/bots/api#available-methods).\n* The optional parameters follow a more logical order for developers, with the more rarely used optional parameters near the end.\n* There is no CancellationToken parameter because it doesn't make sense to abort an immediate TCP request to Client API.  \n_(Even with HTTP Bot API, it didn't make much sense: You can use cancellationToken.ThrowIfCancellationRequested() at various points of your own code if you want it to be cancellable)_\n* In case of an error, WTelegram.Bot will throw `WTelegram.WTException` like `TL.RpcException` showing the raw Telegram error, instead of an ApiRequestException\n* `WTelegram.Bot` and `WTelegramBotClient` are `IDisposable`, so remember to call `.Dispose()`\n\n## How to access the advanced features?\n\nThe [Example app](https://github.com/wiz0u/WTelegramBot/tree/master/Examples/ConsoleApp) demonstrates all of the features below.\n\nOn each Update/Message/User/Chat you receive, there is an extra field named \"`TL...`\" that contains the corresponding raw Client API structure, which may contain extra information not transcribed into the Bot API\n\nYou can also enable property `WantUnknownTLUpdates` to receive updates that usually would have been silently ignored by Bot API\n(they will be posted as Update of type Unknown with the TLUpdate field filled)\n\nSome extended API calls can be made via `WTelegram.Bot` special methods:\n- `GetChatMemberList`: fetch a list of chat members\n- `GetMessagesById`: fetch posted messages (or range of messages) based on their message IDs\n- `InputUser`: can resolve a username into a user ID that you can then use with GetChat\n- `GetChat`: can obtain details about any group/channel based on their public name, or a user ID resolved by InputUser\n- `SetMyPhoto`: change the bot's profile picture\n\nOther extended API calls not usually accessible to Bot API can be made via the `Bot.Client` property which is the underlying [WTelegramClient](https://wiz0u.github.io/WTelegramClient/) instance.  \n* This way, you can use new features available only in Client API latest layers without waiting months for it to be available in Bot API\n\nFor more information about calling Client API methods, you can read that [library's documentation](https://wiz0u.github.io/WTelegramClient/EXAMPLES)\nor search through the [official Client API documentation](https://corefork.telegram.org/methods),\nbut make sure to look for the mention \"**Bots can use this method**\" (other methods can't be called).  \n\n\u003e Note: If you want to experiment with these, you'll need to add a `using TL;` on top of your code, and these calls might throw `TL.RpcException` instead of `ApiRequestException`\n\nSome other `WTelegram.Bot` methods (for example, beginning with Input*) and extension methods can help you convert Bot API ids or structure to/from Client API.\n\n\n## Help with the library\n\nThis library is still quite new but I tested it extensively to make sure it covers all of the Bot API successfully.\n\nIf you have questions about the (official) Bot API methods from TelegramBotClient, you can ask them in [Telegram.Bot support chat](https://t.me/joinchat/B35YY0QbLfd034CFnvCtCA).\n\nIf your question is more specific to WTelegram.Bot, or an issue with library behaviour, you can ask them in [@WTelegramClient](https://t.me/WTelegramClient).\n\nIf you like this library, you can [buy me a coffee](https://www.buymeacoffee.com/wizou) ❤ This will help the project keep going.\n\n© 2021-2025 Olivier Marcoux\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiz0u%2Fwtelegrambot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiz0u%2Fwtelegrambot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiz0u%2Fwtelegrambot/lists"}