MainUsername property on IPeerInfo

This commit is contained in:
Wizou 2023-03-16 13:43:18 +01:00
parent fd9177f805
commit 2f3106fe69
8 changed files with 153 additions and 99 deletions

3
.github/FUNDING.yml vendored
View file

@ -1 +1,2 @@
custom: ["http://t.me/WTelegramBot?start=donate"] github: wiz0u
custom: ["https://www.buymeacoffee.com/wizou", "http://t.me/WTelegramBot?start=donate"]

2
.github/dev.yml vendored
View file

@ -2,7 +2,7 @@ pr: none
trigger: trigger:
- master - master
name: 3.3.2-dev.$(Rev:r) name: 3.3.3-dev.$(Rev:r)
pool: pool:
vmImage: ubuntu-latest vmImage: ubuntu-latest

View file

@ -374,8 +374,9 @@ var chatInvite = await client.Messages_CheckChatInvite("HASH"); // optional: get
await client.Messages_ImportChatInvite("HASH"); // join the channel/group await client.Messages_ImportChatInvite("HASH"); // join the channel/group
// Note: This works also with HASH invite links from public channel/group // Note: This works also with HASH invite links from public channel/group
``` ```
Note: `CheckChatInvite` can return [3 different types of invitation object](https://corefork.telegram.org/type/ChatInvite) `CheckChatInvite` can return [3 different types of invitation object](https://corefork.telegram.org/type/ChatInvite)
You can also use helper methods `AnalyzeInviteLink` and `GetMessageByLink` to more easily fetch information from links.
<a name="add-members"></a> <a name="add-members"></a>
## Add/Invite/Remove someone in a chat ## Add/Invite/Remove someone in a chat
```csharp ```csharp

View file

@ -1,7 +1,7 @@
[![API Layer](https://img.shields.io/badge/API_Layer-155-blueviolet)](https://corefork.telegram.org/methods) [![API Layer](https://img.shields.io/badge/API_Layer-155-blueviolet)](https://corefork.telegram.org/methods)
[![NuGet version](https://img.shields.io/nuget/v/WTelegramClient?color=00508F)](https://www.nuget.org/packages/WTelegramClient/) [![NuGet version](https://img.shields.io/nuget/v/WTelegramClient?color=00508F)](https://www.nuget.org/packages/WTelegramClient/)
[![Build Status](https://img.shields.io/azure-devops/build/wiz0u/WTelegramClient/7)](https://dev.azure.com/wiz0u/WTelegramClient/_build?definitionId=7) [![Build Status](https://img.shields.io/azure-devops/build/wiz0u/WTelegramClient/7)](https://dev.azure.com/wiz0u/WTelegramClient/_build?definitionId=7)
[![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](http://t.me/WTelegramBot?start=donate) [![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://www.buymeacoffee.com/wizou)
## _Telegram Client API library written 100% in C# and .NET_ ## _Telegram Client API library written 100% in C# and .NET_
@ -195,4 +195,4 @@ as well as the [API Terms of Service](https://core.telegram.org/api/terms) or yo
If you read all this ReadMe, the [Frequently Asked Questions](https://wiz0u.github.io/WTelegramClient/FAQ), If you read all this ReadMe, the [Frequently Asked Questions](https://wiz0u.github.io/WTelegramClient/FAQ),
the [Examples codes](https://wiz0u.github.io/WTelegramClient/EXAMPLES) and still have questions, feedback is welcome in our Telegram group [@WTelegramClient](https://t.me/WTelegramClient) the [Examples codes](https://wiz0u.github.io/WTelegramClient/EXAMPLES) and still have questions, feedback is welcome in our Telegram group [@WTelegramClient](https://t.me/WTelegramClient)
If you like this library, please [consider a donation](http://t.me/WTelegramBot?start=donate) ❤ This will help the project keep going. If you like this library, you can [buy me a coffee](https://www.buymeacoffee.com/wizou) ❤ This will help the project keep going.

View file

@ -12,6 +12,7 @@ namespace TL
{ {
long ID { get; } long ID { get; }
bool IsActive { get; } bool IsActive { get; }
string MainUsername { get; }
InputPeer ToInputPeer(); InputPeer ToInputPeer();
} }
@ -142,6 +143,7 @@ namespace TL
{ {
public abstract long ID { get; } public abstract long ID { get; }
public abstract bool IsActive { get; } public abstract bool IsActive { get; }
public abstract string MainUsername { get; }
public abstract InputPeer ToInputPeer(); public abstract InputPeer ToInputPeer();
protected abstract InputUser ToInputUser(); protected abstract InputUser ToInputUser();
public static implicit operator InputPeer(UserBase user) => user?.ToInputPeer(); public static implicit operator InputPeer(UserBase user) => user?.ToInputPeer();
@ -151,6 +153,7 @@ namespace TL
{ {
public override long ID => id; public override long ID => id;
public override bool IsActive => false; public override bool IsActive => false;
public override string MainUsername => null;
public override string ToString() => null; public override string ToString() => null;
public override InputPeer ToInputPeer() => null; public override InputPeer ToInputPeer() => null;
protected override InputUser ToInputUser() => null; protected override InputUser ToInputUser() => null;
@ -159,13 +162,13 @@ namespace TL
{ {
public override long ID => id; public override long ID => id;
public override bool IsActive => (flags & Flags.deleted) == 0; public override bool IsActive => (flags & Flags.deleted) == 0;
public bool IsBot => (flags & Flags.bot) != 0; public override string MainUsername => username ?? usernames?.FirstOrDefault(u => u.flags.HasFlag(Username.Flags.active))?.username;
public string MainUsername => username ?? usernames?.FirstOrDefault(u => u.flags.HasFlag(Username.Flags.active))?.username;
public override string ToString() => MainUsername is string uname ? '@' + uname : last_name == null ? first_name : $"{first_name} {last_name}"; public override string ToString() => MainUsername is string uname ? '@' + uname : last_name == null ? first_name : $"{first_name} {last_name}";
public override InputPeer ToInputPeer() => new InputPeerUser(id, access_hash); public override InputPeer ToInputPeer() => new InputPeerUser(id, access_hash);
protected override InputUser ToInputUser() => new(id, access_hash); protected override InputUser ToInputUser() => new(id, access_hash);
/// <summary>An estimation of the number of days ago the user was last seen (Online=0, Recently=1, LastWeek=5, LastMonth=20, LongTimeAgo=150)</summary> /// <summary>An estimation of the number of days ago the user was last seen (Online=0, Recently=1, LastWeek=5, LastMonth=20, LongTimeAgo=150)</summary>
public TimeSpan LastSeenAgo => status?.LastSeenAgo ?? TimeSpan.FromDays(150); public TimeSpan LastSeenAgo => status?.LastSeenAgo ?? TimeSpan.FromDays(150);
public bool IsBot => (flags & Flags.bot) != 0;
} }
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/userStatusEmpty">userStatusEmpty</a> = last seen a long time ago, more than a month (or blocked/deleted users)</remarks> /// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/userStatusEmpty">userStatusEmpty</a> = last seen a long time ago, more than a month (or blocked/deleted users)</remarks>
@ -183,6 +186,7 @@ namespace TL
{ {
/// <summary>Is this chat among current user active chats?</summary> /// <summary>Is this chat among current user active chats?</summary>
public abstract bool IsActive { get; } public abstract bool IsActive { get; }
public virtual string MainUsername => null;
public abstract ChatPhoto Photo { get; } public abstract ChatPhoto Photo { get; }
/// <summary>returns true if you're banned of any of these rights</summary> /// <summary>returns true if you're banned of any of these rights</summary>
public abstract bool IsBanned(ChatBannedRights.Flags flags = 0); public abstract bool IsBanned(ChatBannedRights.Flags flags = 0);
@ -216,7 +220,7 @@ namespace TL
partial class Channel partial class Channel
{ {
public override bool IsActive => (flags & Flags.left) == 0; public override bool IsActive => (flags & Flags.left) == 0;
public string MainUsername => username ?? usernames?.FirstOrDefault(u => u.flags.HasFlag(Username.Flags.active))?.username; public override string MainUsername => username ?? usernames?.FirstOrDefault(u => u.flags.HasFlag(Username.Flags.active))?.username;
public override ChatPhoto Photo => photo; public override ChatPhoto Photo => photo;
public override bool IsBanned(ChatBannedRights.Flags flags = 0) => ((banned_rights?.flags ?? 0) & flags) != 0 || ((default_banned_rights?.flags ?? 0) & flags) != 0; public override bool IsBanned(ChatBannedRights.Flags flags = 0) => ((banned_rights?.flags ?? 0) & flags) != 0 || ((default_banned_rights?.flags ?? 0) & flags) != 0;
public override InputPeer ToInputPeer() => new InputPeerChannel(id, access_hash); public override InputPeer ToInputPeer() => new InputPeerChannel(id, access_hash);

View file

@ -118,13 +118,13 @@ namespace TL
[TLDef(0xF392B7F4)] [TLDef(0xF392B7F4)]
public class InputPhoneContact : InputContact public class InputPhoneContact : InputContact
{ {
/// <summary>An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using <see cref="SchemaExtensions.Contacts_ImportContacts">Contacts_ImportContacts</see>, in order to retry importing only the contacts that weren&#39;t imported successfully, according to the client_ids returned in <see cref="Contacts_ImportedContacts"/>.<c>retry_contacts</c>.</summary> /// <summary>An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using <see cref="SchemaExtensions.Contacts_ImportContacts">Contacts_ImportContacts</see>, in order to retry importing only the contacts that weren't imported successfully, according to the client_ids returned in <see cref="Contacts_ImportedContacts"/>.<c>retry_contacts</c>.</summary>
public long client_id; public long client_id;
/// <summary>Phone number</summary> /// <summary>Phone number</summary>
public string phone; public string phone;
/// <summary>Contact&#39;s first name</summary> /// <summary>Contact's first name</summary>
public string first_name; public string first_name;
/// <summary>Contact&#39;s last name</summary> /// <summary>Contact's last name</summary>
public string last_name; public string last_name;
} }
@ -2059,6 +2059,7 @@ namespace TL
[TLDef(0xC516D679)] [TLDef(0xC516D679)]
public class MessageActionBotAllowed : MessageAction public class MessageActionBotAllowed : MessageAction
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
/// <summary>The domain name of the website on which the user has logged in.</summary> /// <summary>The domain name of the website on which the user has logged in.</summary>
[IfFlag(0)] public string domain; [IfFlag(0)] public string domain;
@ -2133,6 +2134,7 @@ namespace TL
[TLDef(0x3C134D7B)] [TLDef(0x3C134D7B)]
public class MessageActionSetMessagesTTL : MessageAction public class MessageActionSetMessagesTTL : MessageAction
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
/// <summary>New Time-To-Live</summary> /// <summary>New Time-To-Live</summary>
public int period; public int period;
@ -2192,6 +2194,7 @@ namespace TL
[TLDef(0x0D999256)] [TLDef(0x0D999256)]
public class MessageActionTopicCreate : MessageAction public class MessageActionTopicCreate : MessageAction
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
public string title; public string title;
public int icon_color; public int icon_color;
@ -2199,6 +2202,7 @@ namespace TL
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
/// <summary>Field <see cref="icon_emoji_id"/> has a value</summary>
has_icon_emoji_id = 0x1, has_icon_emoji_id = 0x1,
} }
} }
@ -2206,6 +2210,7 @@ namespace TL
[TLDef(0xC0944820)] [TLDef(0xC0944820)]
public class MessageActionTopicEdit : MessageAction public class MessageActionTopicEdit : MessageAction
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
[IfFlag(0)] public string title; [IfFlag(0)] public string title;
[IfFlag(1)] public long icon_emoji_id; [IfFlag(1)] public long icon_emoji_id;
@ -2214,9 +2219,13 @@ namespace TL
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
/// <summary>Field <see cref="title"/> has a value</summary>
has_title = 0x1, has_title = 0x1,
/// <summary>Field <see cref="icon_emoji_id"/> has a value</summary>
has_icon_emoji_id = 0x2, has_icon_emoji_id = 0x2,
/// <summary>Field <see cref="closed"/> has a value</summary>
has_closed = 0x4, has_closed = 0x4,
/// <summary>Field <see cref="hidden"/> has a value</summary>
has_hidden = 0x8, has_hidden = 0x8,
} }
} }
@ -3190,7 +3199,7 @@ namespace TL
[TLDef(0x1BB00451)] [TLDef(0x1BB00451)]
public class InputMessagesFilterPinned : MessagesFilter { } public class InputMessagesFilterPinned : MessagesFilter { }
/// <summary>Object contains info on events occurred. <para>See <a href="https://corefork.telegram.org/type/Update"/></para> <para>Derived classes: <see cref="UpdateNewMessage"/>, <see cref="UpdateMessageID"/>, <see cref="UpdateDeleteMessages"/>, <see cref="UpdateUserTyping"/>, <see cref="UpdateChatUserTyping"/>, <see cref="UpdateChatParticipants"/>, <see cref="UpdateUserStatus"/>, <see cref="UpdateUserName"/>, <see cref="UpdateUserPhoto"/>, <see cref="UpdateNewEncryptedMessage"/>, <see cref="UpdateEncryptedChatTyping"/>, <see cref="UpdateEncryption"/>, <see cref="UpdateEncryptedMessagesRead"/>, <see cref="UpdateChatParticipantAdd"/>, <see cref="UpdateChatParticipantDelete"/>, <see cref="UpdateDcOptions"/>, <see cref="UpdateNotifySettings"/>, <see cref="UpdateServiceNotification"/>, <see cref="UpdatePrivacy"/>, <see cref="UpdateUserPhone"/>, <see cref="UpdateReadHistoryInbox"/>, <see cref="UpdateReadHistoryOutbox"/>, <see cref="UpdateWebPage"/>, <see cref="UpdateReadMessagesContents"/>, <see cref="UpdateChannelTooLong"/>, <see cref="UpdateChannel"/>, <see cref="UpdateNewChannelMessage"/>, <see cref="UpdateReadChannelInbox"/>, <see cref="UpdateDeleteChannelMessages"/>, <see cref="UpdateChannelMessageViews"/>, <see cref="UpdateChatParticipantAdmin"/>, <see cref="UpdateNewStickerSet"/>, <see cref="UpdateStickerSetsOrder"/>, <see cref="UpdateStickerSets"/>, <see cref="UpdateSavedGifs"/>, <see cref="UpdateBotInlineQuery"/>, <see cref="UpdateBotInlineSend"/>, <see cref="UpdateEditChannelMessage"/>, <see cref="UpdateBotCallbackQuery"/>, <see cref="UpdateEditMessage"/>, <see cref="UpdateInlineBotCallbackQuery"/>, <see cref="UpdateReadChannelOutbox"/>, <see cref="UpdateDraftMessage"/>, <see cref="UpdateReadFeaturedStickers"/>, <see cref="UpdateRecentStickers"/>, <see cref="UpdateConfig"/>, <see cref="UpdatePtsChanged"/>, <see cref="UpdateChannelWebPage"/>, <see cref="UpdateDialogPinned"/>, <see cref="UpdatePinnedDialogs"/>, <see cref="UpdateBotWebhookJSON"/>, <see cref="UpdateBotWebhookJSONQuery"/>, <see cref="UpdateBotShippingQuery"/>, <see cref="UpdateBotPrecheckoutQuery"/>, <see cref="UpdatePhoneCall"/>, <see cref="UpdateLangPackTooLong"/>, <see cref="UpdateLangPack"/>, <see cref="UpdateFavedStickers"/>, <see cref="UpdateChannelReadMessagesContents"/>, <see cref="UpdateContactsReset"/>, <see cref="UpdateChannelAvailableMessages"/>, <see cref="UpdateDialogUnreadMark"/>, <see cref="UpdateMessagePoll"/>, <see cref="UpdateChatDefaultBannedRights"/>, <see cref="UpdateFolderPeers"/>, <see cref="UpdatePeerSettings"/>, <see cref="UpdatePeerLocated"/>, <see cref="UpdateNewScheduledMessage"/>, <see cref="UpdateDeleteScheduledMessages"/>, <see cref="UpdateTheme"/>, <see cref="UpdateGeoLiveViewed"/>, <see cref="UpdateLoginToken"/>, <see cref="UpdateMessagePollVote"/>, <see cref="UpdateDialogFilter"/>, <see cref="UpdateDialogFilterOrder"/>, <see cref="UpdateDialogFilters"/>, <see cref="UpdatePhoneCallSignalingData"/>, <see cref="UpdateChannelMessageForwards"/>, <see cref="UpdateReadChannelDiscussionInbox"/>, <see cref="UpdateReadChannelDiscussionOutbox"/>, <see cref="UpdatePeerBlocked"/>, <see cref="UpdateChannelUserTyping"/>, <see cref="UpdatePinnedMessages"/>, <see cref="UpdatePinnedChannelMessages"/>, <see cref="UpdateChat"/>, <see cref="UpdateGroupCallParticipants"/>, <see cref="UpdateGroupCall"/>, <see cref="UpdatePeerHistoryTTL"/>, <see cref="UpdateChatParticipant"/>, <see cref="UpdateChannelParticipant"/>, <see cref="UpdateBotStopped"/>, <see cref="UpdateGroupCallConnection"/>, <see cref="UpdateBotCommands"/>, <see cref="UpdatePendingJoinRequests"/>, <see cref="UpdateBotChatInviteRequester"/>, <see cref="UpdateMessageReactions"/>, <see cref="UpdateAttachMenuBots"/>, <see cref="UpdateWebViewResultSent"/>, <see cref="UpdateBotMenuButton"/>, <see cref="UpdateSavedRingtones"/>, <see cref="UpdateTranscribedAudio"/>, <see cref="UpdateReadFeaturedEmojiStickers"/>, <see cref="UpdateUserEmojiStatus"/>, <see cref="UpdateRecentEmojiStatuses"/>, <see cref="UpdateRecentReactions"/>, <see cref="UpdateMoveStickerSetToTop"/></para></summary> /// <summary>Object contains info on events occurred. <para>See <a href="https://corefork.telegram.org/type/Update"/></para> <para>Derived classes: <see cref="UpdateNewMessage"/>, <see cref="UpdateMessageID"/>, <see cref="UpdateDeleteMessages"/>, <see cref="UpdateUserTyping"/>, <see cref="UpdateChatUserTyping"/>, <see cref="UpdateChatParticipants"/>, <see cref="UpdateUserStatus"/>, <see cref="UpdateUserName"/>, <see cref="UpdateNewEncryptedMessage"/>, <see cref="UpdateEncryptedChatTyping"/>, <see cref="UpdateEncryption"/>, <see cref="UpdateEncryptedMessagesRead"/>, <see cref="UpdateChatParticipantAdd"/>, <see cref="UpdateChatParticipantDelete"/>, <see cref="UpdateDcOptions"/>, <see cref="UpdateNotifySettings"/>, <see cref="UpdateServiceNotification"/>, <see cref="UpdatePrivacy"/>, <see cref="UpdateUserPhone"/>, <see cref="UpdateReadHistoryInbox"/>, <see cref="UpdateReadHistoryOutbox"/>, <see cref="UpdateWebPage"/>, <see cref="UpdateReadMessagesContents"/>, <see cref="UpdateChannelTooLong"/>, <see cref="UpdateChannel"/>, <see cref="UpdateNewChannelMessage"/>, <see cref="UpdateReadChannelInbox"/>, <see cref="UpdateDeleteChannelMessages"/>, <see cref="UpdateChannelMessageViews"/>, <see cref="UpdateChatParticipantAdmin"/>, <see cref="UpdateNewStickerSet"/>, <see cref="UpdateStickerSetsOrder"/>, <see cref="UpdateStickerSets"/>, <see cref="UpdateSavedGifs"/>, <see cref="UpdateBotInlineQuery"/>, <see cref="UpdateBotInlineSend"/>, <see cref="UpdateEditChannelMessage"/>, <see cref="UpdateBotCallbackQuery"/>, <see cref="UpdateEditMessage"/>, <see cref="UpdateInlineBotCallbackQuery"/>, <see cref="UpdateReadChannelOutbox"/>, <see cref="UpdateDraftMessage"/>, <see cref="UpdateReadFeaturedStickers"/>, <see cref="UpdateRecentStickers"/>, <see cref="UpdateConfig"/>, <see cref="UpdatePtsChanged"/>, <see cref="UpdateChannelWebPage"/>, <see cref="UpdateDialogPinned"/>, <see cref="UpdatePinnedDialogs"/>, <see cref="UpdateBotWebhookJSON"/>, <see cref="UpdateBotWebhookJSONQuery"/>, <see cref="UpdateBotShippingQuery"/>, <see cref="UpdateBotPrecheckoutQuery"/>, <see cref="UpdatePhoneCall"/>, <see cref="UpdateLangPackTooLong"/>, <see cref="UpdateLangPack"/>, <see cref="UpdateFavedStickers"/>, <see cref="UpdateChannelReadMessagesContents"/>, <see cref="UpdateContactsReset"/>, <see cref="UpdateChannelAvailableMessages"/>, <see cref="UpdateDialogUnreadMark"/>, <see cref="UpdateMessagePoll"/>, <see cref="UpdateChatDefaultBannedRights"/>, <see cref="UpdateFolderPeers"/>, <see cref="UpdatePeerSettings"/>, <see cref="UpdatePeerLocated"/>, <see cref="UpdateNewScheduledMessage"/>, <see cref="UpdateDeleteScheduledMessages"/>, <see cref="UpdateTheme"/>, <see cref="UpdateGeoLiveViewed"/>, <see cref="UpdateLoginToken"/>, <see cref="UpdateMessagePollVote"/>, <see cref="UpdateDialogFilter"/>, <see cref="UpdateDialogFilterOrder"/>, <see cref="UpdateDialogFilters"/>, <see cref="UpdatePhoneCallSignalingData"/>, <see cref="UpdateChannelMessageForwards"/>, <see cref="UpdateReadChannelDiscussionInbox"/>, <see cref="UpdateReadChannelDiscussionOutbox"/>, <see cref="UpdatePeerBlocked"/>, <see cref="UpdateChannelUserTyping"/>, <see cref="UpdatePinnedMessages"/>, <see cref="UpdatePinnedChannelMessages"/>, <see cref="UpdateChat"/>, <see cref="UpdateGroupCallParticipants"/>, <see cref="UpdateGroupCall"/>, <see cref="UpdatePeerHistoryTTL"/>, <see cref="UpdateChatParticipant"/>, <see cref="UpdateChannelParticipant"/>, <see cref="UpdateBotStopped"/>, <see cref="UpdateGroupCallConnection"/>, <see cref="UpdateBotCommands"/>, <see cref="UpdatePendingJoinRequests"/>, <see cref="UpdateBotChatInviteRequester"/>, <see cref="UpdateMessageReactions"/>, <see cref="UpdateAttachMenuBots"/>, <see cref="UpdateWebViewResultSent"/>, <see cref="UpdateBotMenuButton"/>, <see cref="UpdateSavedRingtones"/>, <see cref="UpdateTranscribedAudio"/>, <see cref="UpdateReadFeaturedEmojiStickers"/>, <see cref="UpdateUserEmojiStatus"/>, <see cref="UpdateRecentEmojiStatuses"/>, <see cref="UpdateRecentReactions"/>, <see cref="UpdateMoveStickerSetToTop"/></para></summary>
public abstract class Update : IObject { } public abstract class Update : IObject { }
/// <summary>New message in a private chat or in a <a href="https://corefork.telegram.org/api/channel#basic-groups">basic group</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateNewMessage"/></para></summary> /// <summary>New message in a private chat or in a <a href="https://corefork.telegram.org/api/channel#basic-groups">basic group</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateNewMessage"/></para></summary>
[TLDef(0x1F2B0AFD)] [TLDef(0x1F2B0AFD)]
@ -3682,6 +3691,7 @@ namespace TL
[TLDef(0x1B49EC6D)] [TLDef(0x1B49EC6D)]
public class UpdateDraftMessage : Update public class UpdateDraftMessage : Update
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
/// <summary>The peer to which the draft is associated</summary> /// <summary>The peer to which the draft is associated</summary>
public Peer peer; public Peer peer;
@ -3840,6 +3850,7 @@ namespace TL
[TLDef(0xEA29055D)] [TLDef(0xEA29055D)]
public class UpdateChannelReadMessagesContents : Update public class UpdateChannelReadMessagesContents : Update
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
/// <summary><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a> ID</summary> /// <summary><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a> ID</summary>
public long channel_id; public long channel_id;
@ -4315,6 +4326,7 @@ namespace TL
[TLDef(0x5E1B3CB8)] [TLDef(0x5E1B3CB8)]
public class UpdateMessageReactions : Update public class UpdateMessageReactions : Update
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
/// <summary>Peer</summary> /// <summary>Peer</summary>
public Peer peer; public Peer peer;
@ -4418,6 +4430,7 @@ namespace TL
[TLDef(0x192EFBE3)] [TLDef(0x192EFBE3)]
public class UpdateChannelPinnedTopic : Update public class UpdateChannelPinnedTopic : Update
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
public long channel_id; public long channel_id;
public int topic_id; public int topic_id;
@ -4431,12 +4444,14 @@ namespace TL
[TLDef(0xFE198602)] [TLDef(0xFE198602)]
public class UpdateChannelPinnedTopics : Update public class UpdateChannelPinnedTopics : Update
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
public long channel_id; public long channel_id;
[IfFlag(0)] public int[] order; [IfFlag(0)] public int[] order;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
/// <summary>Field <see cref="order"/> has a value</summary>
has_order = 0x1, has_order = 0x1,
} }
} }
@ -7907,6 +7922,7 @@ namespace TL
[TLDef(0xE57B1432)] [TLDef(0xE57B1432)]
public class Auth_SentCodeTypeFirebaseSms : Auth_SentCodeTypeSms public class Auth_SentCodeTypeFirebaseSms : Auth_SentCodeTypeSms
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
[IfFlag(0)] public byte[] nonce; [IfFlag(0)] public byte[] nonce;
[IfFlag(1)] public string receipt; [IfFlag(1)] public string receipt;
@ -7914,7 +7930,9 @@ namespace TL
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
/// <summary>Field <see cref="nonce"/> has a value</summary>
has_nonce = 0x1, has_nonce = 0x1,
/// <summary>Field <see cref="receipt"/> has a value</summary>
has_receipt = 0x2, has_receipt = 0x2,
} }
} }
@ -10137,13 +10155,16 @@ namespace TL
[TLDef(0x5D8D353B)] [TLDef(0x5D8D353B)]
public class ChannelAdminLogEventActionPinTopic : ChannelAdminLogEventAction public class ChannelAdminLogEventActionPinTopic : ChannelAdminLogEventAction
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
[IfFlag(0)] public ForumTopicBase prev_topic; [IfFlag(0)] public ForumTopicBase prev_topic;
[IfFlag(1)] public ForumTopicBase new_topic; [IfFlag(1)] public ForumTopicBase new_topic;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
/// <summary>Field <see cref="prev_topic"/> has a value</summary>
has_prev_topic = 0x1, has_prev_topic = 0x1,
/// <summary>Field <see cref="new_topic"/> has a value</summary>
has_new_topic = 0x2, has_new_topic = 0x2,
} }
} }
@ -13184,6 +13205,7 @@ namespace TL
[TLDef(0xC9EE1D87)] [TLDef(0xC9EE1D87)]
public class Messages_SponsoredMessages : IObject, IPeerResolver public class Messages_SponsoredMessages : IObject, IPeerResolver
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
[IfFlag(0)] public int posts_between; [IfFlag(0)] public int posts_between;
/// <summary>Sponsored messages</summary> /// <summary>Sponsored messages</summary>
@ -13997,12 +14019,13 @@ namespace TL
} }
} }
/// <summary><para>See <a href="https://corefork.telegram.org/type/MessageExtendedMedia"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/type/MessageExtendedMedia"/></para> <para>Derived classes: </para></summary>
public abstract class MessageExtendedMediaBase : IObject { } public abstract class MessageExtendedMediaBase : IObject { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageExtendedMediaPreview"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageExtendedMediaPreview"/></para></summary>
[TLDef(0xAD628CC8)] [TLDef(0xAD628CC8)]
public class MessageExtendedMediaPreview : MessageExtendedMediaBase public class MessageExtendedMediaPreview : MessageExtendedMediaBase
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
[IfFlag(0)] public int w; [IfFlag(0)] public int w;
[IfFlag(0)] public int h; [IfFlag(0)] public int h;
@ -14011,8 +14034,11 @@ namespace TL
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
/// <summary>Field <see cref="w"/> has a value</summary>
has_w = 0x1, has_w = 0x1,
/// <summary>Field <see cref="thumb"/> has a value</summary>
has_thumb = 0x2, has_thumb = 0x2,
/// <summary>Field <see cref="video_duration"/> has a value</summary>
has_video_duration = 0x4, has_video_duration = 0x4,
} }
} }
@ -14035,6 +14061,7 @@ namespace TL
[TLDef(0xB4073647)] [TLDef(0xB4073647)]
public class Username : IObject public class Username : IObject
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
public string username; public string username;
@ -14045,7 +14072,7 @@ namespace TL
} }
} }
/// <summary><para>See <a href="https://corefork.telegram.org/type/ForumTopic"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/type/ForumTopic"/></para> <para>Derived classes: </para></summary>
public abstract class ForumTopicBase : IObject public abstract class ForumTopicBase : IObject
{ {
public virtual int ID { get; } public virtual int ID { get; }
@ -14062,6 +14089,7 @@ namespace TL
[TLDef(0x71701DA9)] [TLDef(0x71701DA9)]
public class ForumTopic : ForumTopicBase public class ForumTopic : ForumTopicBase
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
public int id; public int id;
public DateTime date; public DateTime date;
@ -14080,10 +14108,12 @@ namespace TL
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
/// <summary>Field <see cref="icon_emoji_id"/> has a value</summary>
has_icon_emoji_id = 0x1, has_icon_emoji_id = 0x1,
my = 0x2, my = 0x2,
closed = 0x4, closed = 0x4,
pinned = 0x8, pinned = 0x8,
/// <summary>Field <see cref="draft"/> has a value</summary>
has_draft = 0x10, has_draft = 0x10,
short_ = 0x20, short_ = 0x20,
hidden = 0x40, hidden = 0x40,
@ -14096,6 +14126,7 @@ namespace TL
[TLDef(0x367617D3)] [TLDef(0x367617D3)]
public class Messages_ForumTopics : IObject, IPeerResolver public class Messages_ForumTopics : IObject, IPeerResolver
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
public int count; public int count;
public ForumTopicBase[] topics; public ForumTopicBase[] topics;
@ -14127,19 +14158,22 @@ namespace TL
public DateTime expires; public DateTime expires;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/type/RequestPeerType"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/type/RequestPeerType"/></para> <para>Derived classes: </para></summary>
public abstract class RequestPeerType : IObject { } public abstract class RequestPeerType : IObject { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/requestPeerTypeUser"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/requestPeerTypeUser"/></para></summary>
[TLDef(0x5F3B8A00)] [TLDef(0x5F3B8A00)]
public class RequestPeerTypeUser : RequestPeerType public class RequestPeerTypeUser : RequestPeerType
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
[IfFlag(0)] public bool bot; [IfFlag(0)] public bool bot;
[IfFlag(1)] public bool premium; [IfFlag(1)] public bool premium;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
/// <summary>Field <see cref="bot"/> has a value</summary>
has_bot = 0x1, has_bot = 0x1,
/// <summary>Field <see cref="premium"/> has a value</summary>
has_premium = 0x2, has_premium = 0x2,
} }
} }
@ -14147,6 +14181,7 @@ namespace TL
[TLDef(0xC9F06E1B)] [TLDef(0xC9F06E1B)]
public class RequestPeerTypeChat : RequestPeerType public class RequestPeerTypeChat : RequestPeerType
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
[IfFlag(3)] public bool has_username; [IfFlag(3)] public bool has_username;
[IfFlag(4)] public bool forum; [IfFlag(4)] public bool forum;
@ -14156,9 +14191,13 @@ namespace TL
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
creator = 0x1, creator = 0x1,
/// <summary>Field <see cref="user_admin_rights"/> has a value</summary>
has_user_admin_rights = 0x2, has_user_admin_rights = 0x2,
/// <summary>Field <see cref="bot_admin_rights"/> has a value</summary>
has_bot_admin_rights = 0x4, has_bot_admin_rights = 0x4,
/// <summary>Field <see cref="has_username"/> has a value</summary>
has_has_username = 0x8, has_has_username = 0x8,
/// <summary>Field <see cref="forum"/> has a value</summary>
has_forum = 0x10, has_forum = 0x10,
bot_participant = 0x20, bot_participant = 0x20,
} }
@ -14167,6 +14206,7 @@ namespace TL
[TLDef(0x339BEF6C)] [TLDef(0x339BEF6C)]
public class RequestPeerTypeBroadcast : RequestPeerType public class RequestPeerTypeBroadcast : RequestPeerType
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
[IfFlag(3)] public bool has_username; [IfFlag(3)] public bool has_username;
[IfFlag(1)] public ChatAdminRights user_admin_rights; [IfFlag(1)] public ChatAdminRights user_admin_rights;
@ -14175,8 +14215,11 @@ namespace TL
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
creator = 0x1, creator = 0x1,
/// <summary>Field <see cref="user_admin_rights"/> has a value</summary>
has_user_admin_rights = 0x2, has_user_admin_rights = 0x2,
/// <summary>Field <see cref="bot_admin_rights"/> has a value</summary>
has_bot_admin_rights = 0x4, has_bot_admin_rights = 0x4,
/// <summary>Field <see cref="has_username"/> has a value</summary>
has_has_username = 0x8, has_has_username = 0x8,
} }
} }
@ -14216,7 +14259,7 @@ namespace TL
public MessageEntity[] entities; public MessageEntity[] entities;
} }
/// <summary>Translated text, or no result <para>See <a href="https://corefork.telegram.org/type/messages.TranslatedText"/></para> <para>Derived classes: <see cref="Messages_TranslateNoResult"/>, <see cref="Messages_TranslateResultText"/></para></summary> /// <summary>Translated text, or no result <para>See <a href="https://corefork.telegram.org/type/messages.TranslatedText"/></para> <para>Derived classes: </para></summary>
public abstract class Messages_TranslatedText : IObject { } public abstract class Messages_TranslatedText : IObject { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messages.translateResult"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/messages.translateResult"/></para></summary>
[TLDef(0x33DB32F8)] [TLDef(0x33DB32F8)]
@ -14229,6 +14272,7 @@ namespace TL
[TLDef(0xC84834CE)] [TLDef(0xC84834CE)]
public class AutoSaveSettings : IObject public class AutoSaveSettings : IObject
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
[IfFlag(2)] public long video_max_size; [IfFlag(2)] public long video_max_size;
@ -14236,6 +14280,7 @@ namespace TL
{ {
photos = 0x1, photos = 0x1,
videos = 0x2, videos = 0x2,
/// <summary>Field <see cref="video_max_size"/> has a value</summary>
has_video_max_size = 0x4, has_video_max_size = 0x4,
} }
} }
@ -14271,7 +14316,7 @@ namespace TL
public JsonObject config; public JsonObject config;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/type/InputBotApp"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/type/InputBotApp"/></para> <para>Derived classes: </para></summary>
public abstract class InputBotApp : IObject { } public abstract class InputBotApp : IObject { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputBotAppID"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputBotAppID"/></para></summary>
[TLDef(0xA920BD7A)] [TLDef(0xA920BD7A)]
@ -14293,6 +14338,7 @@ namespace TL
[TLDef(0x95FCD1D6)] [TLDef(0x95FCD1D6)]
public class BotApp : IObject public class BotApp : IObject
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
public long id; public long id;
public long access_hash; public long access_hash;
@ -14305,6 +14351,7 @@ namespace TL
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
/// <summary>Field <see cref="document"/> has a value</summary>
has_document = 0x1, has_document = 0x1,
} }
} }
@ -14313,6 +14360,7 @@ namespace TL
[TLDef(0xEB50ADF5)] [TLDef(0xEB50ADF5)]
public class Messages_BotApp : IObject public class Messages_BotApp : IObject
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary>
public Flags flags; public Flags flags;
public BotApp app; public BotApp app;
@ -14323,7 +14371,7 @@ namespace TL
} }
} }
/// <summary><para>See <a href="https://corefork.telegram.org/type/AppWebViewResult"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/type/AppWebViewResult"/></para> <para>Derived classes: </para></summary>
public abstract class AppWebViewResult : IObject { } public abstract class AppWebViewResult : IObject { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/appWebViewResultUrl"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/appWebViewResultUrl"/></para></summary>
[TLDef(0x3C1B4F0D)] [TLDef(0x3C1B4F0D)]

View file

@ -54,7 +54,7 @@ namespace TL
query = query, query = query,
}); });
/// <summary>Invoke the specified query using the specified API <a href="https://corefork.telegram.org/api/invoking#layers">layer</a> <para>See <a href="https://corefork.telegram.org/method/invokeWithLayer"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/invokeWithLayer#possible-errors">details</a>)</para></summary> /// <summary>Invoke the specified query using the specified API <a href="https://corefork.telegram.org/api/invoking#layers">layer</a> <para>See <a href="https://corefork.telegram.org/method/invokeWithLayer"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/invokeWithLayer#possible-errors">details</a>)</para></summary>
/// <param name="layer">The layer to use</param> /// <param name="layer">The layer to use</param>
/// <param name="query">The query</param> /// <param name="query">The query</param>
public static Task<X> InvokeWithLayer<X>(this Client client, int layer, IMethod<X> query) public static Task<X> InvokeWithLayer<X>(this Client client, int layer, IMethod<X> query)
@ -286,7 +286,7 @@ namespace TL
code = code, code = code,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/auth.importWebTokenAuthorization"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/auth.importWebTokenAuthorization"/> [bots: ✓]</para></summary>
public static Task<Auth_AuthorizationBase> Auth_ImportWebTokenAuthorization(this Client client, int api_id, string api_hash, string web_auth_token) public static Task<Auth_AuthorizationBase> Auth_ImportWebTokenAuthorization(this Client client, int api_id, string api_hash, string web_auth_token)
=> client.Invoke(new Auth_ImportWebTokenAuthorization => client.Invoke(new Auth_ImportWebTokenAuthorization
{ {
@ -295,7 +295,7 @@ namespace TL
web_auth_token = web_auth_token, web_auth_token = web_auth_token,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/auth.requestFirebaseSms"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/auth.requestFirebaseSms"/> [bots: ✓]</para></summary>
public static Task<bool> Auth_RequestFirebaseSms(this Client client, string phone_number, string phone_code_hash, string safety_net_token = null, string ios_push_secret = null) public static Task<bool> Auth_RequestFirebaseSms(this Client client, string phone_number, string phone_code_hash, string safety_net_token = null, string ios_push_secret = null)
=> client.Invoke(new Auth_RequestFirebaseSms => client.Invoke(new Auth_RequestFirebaseSms
{ {
@ -921,7 +921,7 @@ namespace TL
{ {
}); });
/// <summary>Get info about multiple <a href="https://corefork.telegram.org/api/wallpapers">wallpapers</a> <para>See <a href="https://corefork.telegram.org/method/account.getMultiWallPapers"/></para></summary> /// <summary>Get info about multiple <a href="https://corefork.telegram.org/api/wallpapers">wallpapers</a> <para>See <a href="https://corefork.telegram.org/method/account.getMultiWallPapers"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/account.getMultiWallPapers#possible-errors">details</a>)</para></summary>
/// <param name="wallpapers"><a href="https://corefork.telegram.org/api/wallpapers">Wallpapers</a> to fetch info about</param> /// <param name="wallpapers"><a href="https://corefork.telegram.org/api/wallpapers">Wallpapers</a> to fetch info about</param>
public static Task<WallPaperBase[]> Account_GetMultiWallPapers(this Client client, params InputWallPaperBase[] wallpapers) public static Task<WallPaperBase[]> Account_GetMultiWallPapers(this Client client, params InputWallPaperBase[] wallpapers)
=> client.Invoke(new Account_GetMultiWallPapers => client.Invoke(new Account_GetMultiWallPapers
@ -1062,14 +1062,14 @@ namespace TL
{ {
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.reorderUsernames"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/account.reorderUsernames"/> [bots: ✓]</para></summary>
public static Task<bool> Account_ReorderUsernames(this Client client, params string[] order) public static Task<bool> Account_ReorderUsernames(this Client client, params string[] order)
=> client.Invoke(new Account_ReorderUsernames => client.Invoke(new Account_ReorderUsernames
{ {
order = order, order = order,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.toggleUsername"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/account.toggleUsername"/> [bots: ✓]</para></summary>
public static Task<bool> Account_ToggleUsername(this Client client, string username, bool active) public static Task<bool> Account_ToggleUsername(this Client client, string username, bool active)
=> client.Invoke(new Account_ToggleUsername => client.Invoke(new Account_ToggleUsername
{ {
@ -1077,7 +1077,7 @@ namespace TL
active = active, active = active,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.getDefaultProfilePhotoEmojis"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/account.getDefaultProfilePhotoEmojis"/> [bots: ✓]</para></summary>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/emojiListNotModified">emojiListNotModified</a></returns> /// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/emojiListNotModified">emojiListNotModified</a></returns>
public static Task<EmojiList> Account_GetDefaultProfilePhotoEmojis(this Client client, long hash = default) public static Task<EmojiList> Account_GetDefaultProfilePhotoEmojis(this Client client, long hash = default)
=> client.Invoke(new Account_GetDefaultProfilePhotoEmojis => client.Invoke(new Account_GetDefaultProfilePhotoEmojis
@ -1085,7 +1085,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.getDefaultGroupPhotoEmojis"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/account.getDefaultGroupPhotoEmojis"/> [bots: ✓]</para></summary>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/emojiListNotModified">emojiListNotModified</a></returns> /// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/emojiListNotModified">emojiListNotModified</a></returns>
public static Task<EmojiList> Account_GetDefaultGroupPhotoEmojis(this Client client, long hash = default) public static Task<EmojiList> Account_GetDefaultGroupPhotoEmojis(this Client client, long hash = default)
=> client.Invoke(new Account_GetDefaultGroupPhotoEmojis => client.Invoke(new Account_GetDefaultGroupPhotoEmojis
@ -1093,13 +1093,13 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.getAutoSaveSettings"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/account.getAutoSaveSettings"/> [bots: ✓]</para></summary>
public static Task<Account_AutoSaveSettings> Account_GetAutoSaveSettings(this Client client) public static Task<Account_AutoSaveSettings> Account_GetAutoSaveSettings(this Client client)
=> client.Invoke(new Account_GetAutoSaveSettings => client.Invoke(new Account_GetAutoSaveSettings
{ {
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.saveAutoSaveSettings"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/account.saveAutoSaveSettings"/> [bots: ✓]</para></summary>
public static Task<bool> Account_SaveAutoSaveSettings(this Client client, AutoSaveSettings settings, InputPeer peer = null, bool users = false, bool chats = false, bool broadcasts = false) public static Task<bool> Account_SaveAutoSaveSettings(this Client client, AutoSaveSettings settings, InputPeer peer = null, bool users = false, bool chats = false, bool broadcasts = false)
=> client.Invoke(new Account_SaveAutoSaveSettings => client.Invoke(new Account_SaveAutoSaveSettings
{ {
@ -1108,7 +1108,7 @@ namespace TL
settings = settings, settings = settings,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.deleteAutoSaveExceptions"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/account.deleteAutoSaveExceptions"/> [bots: ✓]</para></summary>
public static Task<bool> Account_DeleteAutoSaveExceptions(this Client client) public static Task<bool> Account_DeleteAutoSaveExceptions(this Client client)
=> client.Invoke(new Account_DeleteAutoSaveExceptions => client.Invoke(new Account_DeleteAutoSaveExceptions
{ {
@ -1339,13 +1339,13 @@ namespace TL
phone = phone, phone = phone,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/contacts.exportContactToken"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/contacts.exportContactToken"/> [bots: ✓]</para></summary>
public static Task<ExportedContactToken> Contacts_ExportContactToken(this Client client) public static Task<ExportedContactToken> Contacts_ExportContactToken(this Client client)
=> client.Invoke(new Contacts_ExportContactToken => client.Invoke(new Contacts_ExportContactToken
{ {
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/contacts.importContactToken"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/contacts.importContactToken"/> [bots: ✓]</para></summary>
public static Task<UserBase> Contacts_ImportContactToken(this Client client, string token) public static Task<UserBase> Contacts_ImportContactToken(this Client client, string token)
=> client.Invoke(new Contacts_ImportContactToken => client.Invoke(new Contacts_ImportContactToken
{ {
@ -1360,7 +1360,7 @@ namespace TL
id = id, id = id,
}); });
/// <summary>Returns the current user dialog list. <para>See <a href="https://corefork.telegram.org/method/messages.getDialogs"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getDialogs#possible-errors">details</a>)</para></summary> /// <summary>Returns the current user dialog list. <para>See <a href="https://corefork.telegram.org/method/messages.getDialogs"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.getDialogs#possible-errors">details</a>)</para></summary>
/// <param name="exclude_pinned">Exclude pinned dialogs</param> /// <param name="exclude_pinned">Exclude pinned dialogs</param>
/// <param name="folder_id"><a href="https://corefork.telegram.org/api/folders#peer-folders">Peer folder ID, for more info click here</a></param> /// <param name="folder_id"><a href="https://corefork.telegram.org/api/folders#peer-folders">Peer folder ID, for more info click here</a></param>
/// <param name="offset_date"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param> /// <param name="offset_date"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
@ -1380,7 +1380,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary>Returns the conversation history with one interlocutor / within a chat <para>See <a href="https://corefork.telegram.org/method/messages.getHistory"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getHistory#possible-errors">details</a>)</para></summary> /// <summary>Returns the conversation history with one interlocutor / within a chat <para>See <a href="https://corefork.telegram.org/method/messages.getHistory"/></para> <para>Possible <see cref="RpcException"/> codes: 400,406 (<a href="https://corefork.telegram.org/method/messages.getHistory#possible-errors">details</a>)</para></summary>
/// <param name="peer">Target peer</param> /// <param name="peer">Target peer</param>
/// <param name="offset_id">Only return messages starting from the specified message ID</param> /// <param name="offset_id">Only return messages starting from the specified message ID</param>
/// <param name="offset_date">Only return messages sent before the specified date</param> /// <param name="offset_date">Only return messages sent before the specified date</param>
@ -1402,7 +1402,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary>Returns found messages <para>See <a href="https://corefork.telegram.org/method/messages.search"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.search#possible-errors">details</a>)</para></summary> /// <summary>Returns found messages <para>See <a href="https://corefork.telegram.org/method/messages.search"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.search#possible-errors">details</a>)</para></summary>
/// <param name="peer">User or chat, histories with which are searched, or <see langword="null"/> for global search</param> /// <param name="peer">User or chat, histories with which are searched, or <see langword="null"/> for global search</param>
/// <param name="q">Text search request</param> /// <param name="q">Text search request</param>
/// <param name="from_id">Only return messages sent by the specified user ID</param> /// <param name="from_id">Only return messages sent by the specified user ID</param>
@ -1480,7 +1480,7 @@ namespace TL
max_id = max_id, max_id = max_id,
}); });
/// <summary>Sends a current user typing event (see <see cref="SendMessageAction"/> for all event types) to a conversation partner or group. <para>See <a href="https://corefork.telegram.org/method/messages.setTyping"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.setTyping#possible-errors">details</a>)</para></summary> /// <summary>Sends a current user typing event (see <see cref="SendMessageAction"/> for all event types) to a conversation partner or group. <para>See <a href="https://corefork.telegram.org/method/messages.setTyping"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/messages.setTyping#possible-errors">details</a>)</para></summary>
/// <param name="peer">Target user or group</param> /// <param name="peer">Target user or group</param>
/// <param name="top_msg_id"><a href="https://corefork.telegram.org/api/threads">Thread ID</a></param> /// <param name="top_msg_id"><a href="https://corefork.telegram.org/api/threads">Thread ID</a></param>
/// <param name="action">Type of action</param> /// <param name="action">Type of action</param>
@ -1493,7 +1493,7 @@ namespace TL
action = action, action = action,
}); });
/// <summary>Sends a message to a chat <para>See <a href="https://corefork.telegram.org/method/messages.sendMessage"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,420,500 (<a href="https://corefork.telegram.org/method/messages.sendMessage#possible-errors">details</a>)</para></summary> /// <summary>Sends a message to a chat <para>See <a href="https://corefork.telegram.org/method/messages.sendMessage"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406,420,500 (<a href="https://corefork.telegram.org/method/messages.sendMessage#possible-errors">details</a>)</para></summary>
/// <param name="no_webpage">Set this flag to disable generation of the webpage preview</param> /// <param name="no_webpage">Set this flag to disable generation of the webpage preview</param>
/// <param name="silent">Send this message silently (no notifications for the receivers)</param> /// <param name="silent">Send this message silently (no notifications for the receivers)</param>
/// <param name="background">Send this message as background message</param> /// <param name="background">Send this message as background message</param>
@ -1523,7 +1523,7 @@ namespace TL
send_as = send_as, send_as = send_as,
}); });
/// <summary>Send a media <para>See <a href="https://corefork.telegram.org/method/messages.sendMedia"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,420,500 (<a href="https://corefork.telegram.org/method/messages.sendMedia#possible-errors">details</a>)</para></summary> /// <summary>Send a media <para>See <a href="https://corefork.telegram.org/method/messages.sendMedia"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406,420,500 (<a href="https://corefork.telegram.org/method/messages.sendMedia#possible-errors">details</a>)</para></summary>
/// <param name="silent">Send message silently (no notification should be triggered)</param> /// <param name="silent">Send message silently (no notification should be triggered)</param>
/// <param name="background">Send message in background</param> /// <param name="background">Send message in background</param>
/// <param name="clear_draft">Clear the draft</param> /// <param name="clear_draft">Clear the draft</param>
@ -1670,7 +1670,7 @@ namespace TL
user_id = user_id, user_id = user_id,
}); });
/// <summary>Creates a new chat. <para>See <a href="https://corefork.telegram.org/method/messages.createChat"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403,500 (<a href="https://corefork.telegram.org/method/messages.createChat#possible-errors">details</a>)</para></summary> /// <summary>Creates a new chat. <para>See <a href="https://corefork.telegram.org/method/messages.createChat"/></para> <para>Possible <see cref="RpcException"/> codes: 400,406,500 (<a href="https://corefork.telegram.org/method/messages.createChat#possible-errors">details</a>)</para></summary>
/// <param name="users">List of user IDs to be invited</param> /// <param name="users">List of user IDs to be invited</param>
/// <param name="title">Chat name</param> /// <param name="title">Chat name</param>
public static Task<UpdatesBase> Messages_CreateChat(this Client client, InputUserBase[] users, string title, int? ttl_period = null) public static Task<UpdatesBase> Messages_CreateChat(this Client client, InputUserBase[] users, string title, int? ttl_period = null)
@ -1888,7 +1888,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary>Install a stickerset <para>See <a href="https://corefork.telegram.org/method/messages.installStickerSet"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.installStickerSet#possible-errors">details</a>)</para></summary> /// <summary>Install a stickerset <para>See <a href="https://corefork.telegram.org/method/messages.installStickerSet"/></para> <para>Possible <see cref="RpcException"/> codes: 406 (<a href="https://corefork.telegram.org/method/messages.installStickerSet#possible-errors">details</a>)</para></summary>
/// <param name="stickerset">Stickerset to install</param> /// <param name="stickerset">Stickerset to install</param>
/// <param name="archived">Whether to archive stickerset</param> /// <param name="archived">Whether to archive stickerset</param>
public static Task<Messages_StickerSetInstallResult> Messages_InstallStickerSet(this Client client, InputStickerSet stickerset, bool archived) public static Task<Messages_StickerSetInstallResult> Messages_InstallStickerSet(this Client client, InputStickerSet stickerset, bool archived)
@ -1898,7 +1898,7 @@ namespace TL
archived = archived, archived = archived,
}); });
/// <summary>Uninstall a stickerset <para>See <a href="https://corefork.telegram.org/method/messages.uninstallStickerSet"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.uninstallStickerSet#possible-errors">details</a>)</para></summary> /// <summary>Uninstall a stickerset <para>See <a href="https://corefork.telegram.org/method/messages.uninstallStickerSet"/></para> <para>Possible <see cref="RpcException"/> codes: 406 (<a href="https://corefork.telegram.org/method/messages.uninstallStickerSet#possible-errors">details</a>)</para></summary>
/// <param name="stickerset">The stickerset to uninstall</param> /// <param name="stickerset">The stickerset to uninstall</param>
public static Task<bool> Messages_UninstallStickerSet(this Client client, InputStickerSet stickerset) public static Task<bool> Messages_UninstallStickerSet(this Client client, InputStickerSet stickerset)
=> client.Invoke(new Messages_UninstallStickerSet => client.Invoke(new Messages_UninstallStickerSet
@ -1920,7 +1920,7 @@ namespace TL
start_param = start_param, start_param = start_param,
}); });
/// <summary>Get and increase the view counter of a message sent or forwarded from a <a href="https://corefork.telegram.org/api/channel">channel</a> <para>See <a href="https://corefork.telegram.org/method/messages.getMessagesViews"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getMessagesViews#possible-errors">details</a>)</para></summary> /// <summary>Get and increase the view counter of a message sent or forwarded from a <a href="https://corefork.telegram.org/api/channel">channel</a> <para>See <a href="https://corefork.telegram.org/method/messages.getMessagesViews"/></para> <para>Possible <see cref="RpcException"/> codes: 400,406 (<a href="https://corefork.telegram.org/method/messages.getMessagesViews#possible-errors">details</a>)</para></summary>
/// <param name="peer">Peer where the message was found</param> /// <param name="peer">Peer where the message was found</param>
/// <param name="id">ID of message</param> /// <param name="id">ID of message</param>
/// <param name="increment">Whether to mark the message as viewed and increment the view counter</param> /// <param name="increment">Whether to mark the message as viewed and increment the view counter</param>
@ -2019,7 +2019,7 @@ namespace TL
unsave = unsave, unsave = unsave,
}); });
/// <summary>Query an inline bot <para>See <a href="https://corefork.telegram.org/method/messages.getInlineBotResults"/></para> <para>Possible <see cref="RpcException"/> codes: 400,-503 (<a href="https://corefork.telegram.org/method/messages.getInlineBotResults#possible-errors">details</a>)</para></summary> /// <summary>Query an inline bot <para>See <a href="https://corefork.telegram.org/method/messages.getInlineBotResults"/></para> <para>Possible <see cref="RpcException"/> codes: 400,406,-503 (<a href="https://corefork.telegram.org/method/messages.getInlineBotResults#possible-errors">details</a>)</para></summary>
/// <param name="bot">The bot to query</param> /// <param name="bot">The bot to query</param>
/// <param name="peer">The currently opened chat</param> /// <param name="peer">The currently opened chat</param>
/// <param name="geo_point">The geolocation, if requested</param> /// <param name="geo_point">The geolocation, if requested</param>
@ -2092,7 +2092,7 @@ namespace TL
id = id, id = id,
}); });
/// <summary>Edit message <para>See <a href="https://corefork.telegram.org/method/messages.editMessage"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.editMessage#possible-errors">details</a>)</para></summary> /// <summary>Edit message <para>See <a href="https://corefork.telegram.org/method/messages.editMessage"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/messages.editMessage#possible-errors">details</a>)</para></summary>
/// <param name="no_webpage">Disable webpage preview</param> /// <param name="no_webpage">Disable webpage preview</param>
/// <param name="peer">Where was the message sent</param> /// <param name="peer">Where was the message sent</param>
/// <param name="id">ID of the message to edit</param> /// <param name="id">ID of the message to edit</param>
@ -2164,7 +2164,7 @@ namespace TL
cache_time = cache_time, cache_time = cache_time,
}); });
/// <summary>Get dialog info of specified peers <para>See <a href="https://corefork.telegram.org/method/messages.getPeerDialogs"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getPeerDialogs#possible-errors">details</a>)</para></summary> /// <summary>Get dialog info of specified peers <para>See <a href="https://corefork.telegram.org/method/messages.getPeerDialogs"/></para> <para>Possible <see cref="RpcException"/> codes: 400,406 (<a href="https://corefork.telegram.org/method/messages.getPeerDialogs#possible-errors">details</a>)</para></summary>
/// <param name="peers">Peers</param> /// <param name="peers">Peers</param>
public static Task<Messages_PeerDialogs> Messages_GetPeerDialogs(this Client client, params InputDialogPeerBase[] peers) public static Task<Messages_PeerDialogs> Messages_GetPeerDialogs(this Client client, params InputDialogPeerBase[] peers)
=> client.Invoke(new Messages_GetPeerDialogs => client.Invoke(new Messages_GetPeerDialogs
@ -3112,7 +3112,7 @@ namespace TL
limit = limit, limit = limit,
}); });
/// <summary>Dismiss or approve a chat <a href="https://corefork.telegram.org/api/invites#join-requests">join request</a> related to a specific chat or channel. <para>See <a href="https://corefork.telegram.org/method/messages.hideChatJoinRequest"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.hideChatJoinRequest#possible-errors">details</a>)</para></summary> /// <summary>Dismiss or approve a chat <a href="https://corefork.telegram.org/api/invites#join-requests">join request</a> related to a specific chat or channel. <para>See <a href="https://corefork.telegram.org/method/messages.hideChatJoinRequest"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.hideChatJoinRequest#possible-errors">details</a>)</para></summary>
/// <param name="approved">Whether to dismiss or approve the chat <a href="https://corefork.telegram.org/api/invites#join-requests">join request »</a></param> /// <param name="approved">Whether to dismiss or approve the chat <a href="https://corefork.telegram.org/api/invites#join-requests">join request »</a></param>
/// <param name="peer">The chat or channel</param> /// <param name="peer">The chat or channel</param>
/// <param name="user_id">The user whose <a href="https://corefork.telegram.org/api/invites#join-requests">join request »</a> should be dismissed or approved</param> /// <param name="user_id">The user whose <a href="https://corefork.telegram.org/api/invites#join-requests">join request »</a> should be dismissed or approved</param>
@ -3136,7 +3136,7 @@ namespace TL
link = link, link = link,
}); });
/// <summary>Enable or disable <a href="https://telegram.org/blog/protected-content-delete-by-date-and-more">content protection</a> on a channel or chat <para>See <a href="https://corefork.telegram.org/method/messages.toggleNoForwards"/></para></summary> /// <summary>Enable or disable <a href="https://telegram.org/blog/protected-content-delete-by-date-and-more">content protection</a> on a channel or chat <para>See <a href="https://corefork.telegram.org/method/messages.toggleNoForwards"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.toggleNoForwards#possible-errors">details</a>)</para></summary>
/// <param name="peer">The chat or channel</param> /// <param name="peer">The chat or channel</param>
/// <param name="enabled">Enable or disable content protection</param> /// <param name="enabled">Enable or disable content protection</param>
public static Task<UpdatesBase> Messages_ToggleNoForwards(this Client client, InputPeer peer, bool enabled) public static Task<UpdatesBase> Messages_ToggleNoForwards(this Client client, InputPeer peer, bool enabled)
@ -3171,7 +3171,7 @@ namespace TL
reaction = reaction, reaction = reaction,
}); });
/// <summary>Get <a href="https://corefork.telegram.org/api/reactions">message reactions »</a> <para>See <a href="https://corefork.telegram.org/method/messages.getMessagesReactions"/></para></summary> /// <summary>Get <a href="https://corefork.telegram.org/api/reactions">message reactions »</a> <para>See <a href="https://corefork.telegram.org/method/messages.getMessagesReactions"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getMessagesReactions#possible-errors">details</a>)</para></summary>
/// <param name="peer">Peer</param> /// <param name="peer">Peer</param>
/// <param name="id">Message IDs</param> /// <param name="id">Message IDs</param>
public static Task<UpdatesBase> Messages_GetMessagesReactions(this Client client, InputPeer peer, params int[] id) public static Task<UpdatesBase> Messages_GetMessagesReactions(this Client client, InputPeer peer, params int[] id)
@ -3269,7 +3269,7 @@ namespace TL
top_msg_id = top_msg_id.GetValueOrDefault(), top_msg_id = top_msg_id.GetValueOrDefault(),
}); });
/// <summary>View and search recently sent media.<br/>This method does not support pagination. <para>See <a href="https://corefork.telegram.org/method/messages.searchSentMedia"/></para></summary> /// <summary>View and search recently sent media.<br/>This method does not support pagination. <para>See <a href="https://corefork.telegram.org/method/messages.searchSentMedia"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.searchSentMedia#possible-errors">details</a>)</para></summary>
/// <param name="q">Optional search query</param> /// <param name="q">Optional search query</param>
/// <param name="filter">Message filter</param> /// <param name="filter">Message filter</param>
/// <param name="limit">Maximum number of results to return (max 100).</param> /// <param name="limit">Maximum number of results to return (max 100).</param>
@ -3393,7 +3393,7 @@ namespace TL
data = data, data = data,
}); });
/// <summary><a href="https://corefork.telegram.org/api/transcribe">Transcribe voice message</a> <para>See <a href="https://corefork.telegram.org/method/messages.transcribeAudio"/></para></summary> /// <summary><a href="https://corefork.telegram.org/api/transcribe">Transcribe voice message</a> <para>See <a href="https://corefork.telegram.org/method/messages.transcribeAudio"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.transcribeAudio#possible-errors">details</a>)</para></summary>
/// <param name="peer">Peer ID where the voice message was sent</param> /// <param name="peer">Peer ID where the voice message was sent</param>
/// <param name="msg_id">Voice message ID</param> /// <param name="msg_id">Voice message ID</param>
public static Task<Messages_TranscribedAudio> Messages_TranscribeAudio(this Client client, InputPeer peer, int msg_id) public static Task<Messages_TranscribedAudio> Messages_TranscribeAudio(this Client client, InputPeer peer, int msg_id)
@ -3490,20 +3490,20 @@ namespace TL
id = id, id = id,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.setDefaultHistoryTTL"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.setDefaultHistoryTTL"/> [bots: ✓]</para></summary>
public static Task<bool> Messages_SetDefaultHistoryTTL(this Client client, int period) public static Task<bool> Messages_SetDefaultHistoryTTL(this Client client, int period)
=> client.Invoke(new Messages_SetDefaultHistoryTTL => client.Invoke(new Messages_SetDefaultHistoryTTL
{ {
period = period, period = period,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getDefaultHistoryTTL"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getDefaultHistoryTTL"/> [bots: ✓]</para></summary>
public static Task<DefaultHistoryTTL> Messages_GetDefaultHistoryTTL(this Client client) public static Task<DefaultHistoryTTL> Messages_GetDefaultHistoryTTL(this Client client)
=> client.Invoke(new Messages_GetDefaultHistoryTTL => client.Invoke(new Messages_GetDefaultHistoryTTL
{ {
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.sendBotRequestedPeer"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.sendBotRequestedPeer"/> [bots: ✓]</para></summary>
public static Task<UpdatesBase> Messages_SendBotRequestedPeer(this Client client, InputPeer peer, int msg_id, int button_id, InputPeer requested_peer) public static Task<UpdatesBase> Messages_SendBotRequestedPeer(this Client client, InputPeer peer, int msg_id, int button_id, InputPeer requested_peer)
=> client.Invoke(new Messages_SendBotRequestedPeer => client.Invoke(new Messages_SendBotRequestedPeer
{ {
@ -3513,7 +3513,7 @@ namespace TL
requested_peer = requested_peer, requested_peer = requested_peer,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getEmojiGroups"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getEmojiGroups"/> [bots: ✓]</para></summary>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.emojiGroupsNotModified">messages.emojiGroupsNotModified</a></returns> /// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.emojiGroupsNotModified">messages.emojiGroupsNotModified</a></returns>
public static Task<Messages_EmojiGroups> Messages_GetEmojiGroups(this Client client, int hash = default) public static Task<Messages_EmojiGroups> Messages_GetEmojiGroups(this Client client, int hash = default)
=> client.Invoke(new Messages_GetEmojiGroups => client.Invoke(new Messages_GetEmojiGroups
@ -3521,7 +3521,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getEmojiStatusGroups"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getEmojiStatusGroups"/> [bots: ✓]</para></summary>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.emojiGroupsNotModified">messages.emojiGroupsNotModified</a></returns> /// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.emojiGroupsNotModified">messages.emojiGroupsNotModified</a></returns>
public static Task<Messages_EmojiGroups> Messages_GetEmojiStatusGroups(this Client client, int hash = default) public static Task<Messages_EmojiGroups> Messages_GetEmojiStatusGroups(this Client client, int hash = default)
=> client.Invoke(new Messages_GetEmojiStatusGroups => client.Invoke(new Messages_GetEmojiStatusGroups
@ -3529,7 +3529,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getEmojiProfilePhotoGroups"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getEmojiProfilePhotoGroups"/> [bots: ✓]</para></summary>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.emojiGroupsNotModified">messages.emojiGroupsNotModified</a></returns> /// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.emojiGroupsNotModified">messages.emojiGroupsNotModified</a></returns>
public static Task<Messages_EmojiGroups> Messages_GetEmojiProfilePhotoGroups(this Client client, int hash = default) public static Task<Messages_EmojiGroups> Messages_GetEmojiProfilePhotoGroups(this Client client, int hash = default)
=> client.Invoke(new Messages_GetEmojiProfilePhotoGroups => client.Invoke(new Messages_GetEmojiProfilePhotoGroups
@ -3537,7 +3537,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.searchCustomEmoji"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.searchCustomEmoji"/> [bots: ✓]</para></summary>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/emojiListNotModified">emojiListNotModified</a></returns> /// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/emojiListNotModified">emojiListNotModified</a></returns>
public static Task<EmojiList> Messages_SearchCustomEmoji(this Client client, string emoticon, long hash = default) public static Task<EmojiList> Messages_SearchCustomEmoji(this Client client, string emoticon, long hash = default)
=> client.Invoke(new Messages_SearchCustomEmoji => client.Invoke(new Messages_SearchCustomEmoji
@ -3546,7 +3546,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.togglePeerTranslations"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.togglePeerTranslations"/> [bots: ✓]</para></summary>
public static Task<bool> Messages_TogglePeerTranslations(this Client client, InputPeer peer, bool disabled = false) public static Task<bool> Messages_TogglePeerTranslations(this Client client, InputPeer peer, bool disabled = false)
=> client.Invoke(new Messages_TogglePeerTranslations => client.Invoke(new Messages_TogglePeerTranslations
{ {
@ -3554,7 +3554,7 @@ namespace TL
peer = peer, peer = peer,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getBotApp"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getBotApp"/> [bots: ✓]</para></summary>
public static Task<Messages_BotApp> Messages_GetBotApp(this Client client, InputBotApp app, long hash = default) public static Task<Messages_BotApp> Messages_GetBotApp(this Client client, InputBotApp app, long hash = default)
=> client.Invoke(new Messages_GetBotApp => client.Invoke(new Messages_GetBotApp
{ {
@ -3562,7 +3562,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.requestAppWebView"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/messages.requestAppWebView"/> [bots: ✓]</para></summary>
public static Task<AppWebViewResult> Messages_RequestAppWebView(this Client client, InputPeer peer, InputBotApp app, string platform, string start_param = null, DataJSON theme_params = null, bool write_allowed = false) public static Task<AppWebViewResult> Messages_RequestAppWebView(this Client client, InputPeer peer, InputBotApp app, string platform, string start_param = null, DataJSON theme_params = null, bool write_allowed = false)
=> client.Invoke(new Messages_RequestAppWebView => client.Invoke(new Messages_RequestAppWebView
{ {
@ -3595,7 +3595,7 @@ namespace TL
qts = qts, qts = qts,
}); });
/// <summary>Returns the difference between the current state of updates of a certain channel and transmitted. <para>See <a href="https://corefork.telegram.org/method/updates.getChannelDifference"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,500 (<a href="https://corefork.telegram.org/method/updates.getChannelDifference#possible-errors">details</a>)</para></summary> /// <summary>Returns the difference between the current state of updates of a certain channel and transmitted. <para>See <a href="https://corefork.telegram.org/method/updates.getChannelDifference"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406,500 (<a href="https://corefork.telegram.org/method/updates.getChannelDifference#possible-errors">details</a>)</para></summary>
/// <param name="force">Set to true to skip some possibly unneeded updates and reduce server-side load</param> /// <param name="force">Set to true to skip some possibly unneeded updates and reduce server-side load</param>
/// <param name="channel">The channel</param> /// <param name="channel">The channel</param>
/// <param name="filter">Messsage filter</param> /// <param name="filter">Messsage filter</param>
@ -3656,7 +3656,7 @@ namespace TL
limit = limit, limit = limit,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/photos.uploadContactProfilePhoto"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/photos.uploadContactProfilePhoto"/> [bots: ✓]</para></summary>
public static Task<Photos_Photo> Photos_UploadContactProfilePhoto(this Client client, InputUserBase user_id, InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null, VideoSizeBase video_emoji_markup = null, bool suggest = false, bool save = false) public static Task<Photos_Photo> Photos_UploadContactProfilePhoto(this Client client, InputUserBase user_id, InputFileBase file = null, InputFileBase video = null, double? video_start_ts = null, VideoSizeBase video_emoji_markup = null, bool suggest = false, bool save = false)
=> client.Invoke(new Photos_UploadContactProfilePhoto => client.Invoke(new Photos_UploadContactProfilePhoto
{ {
@ -3834,7 +3834,7 @@ namespace TL
{ {
}); });
/// <summary>Accept the new terms of service <para>See <a href="https://corefork.telegram.org/method/help.acceptTermsOfService"/></para></summary> /// <summary>Accept the new terms of service <para>See <a href="https://corefork.telegram.org/method/help.acceptTermsOfService"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/help.acceptTermsOfService#possible-errors">details</a>)</para></summary>
/// <param name="id">ID of terms of service</param> /// <param name="id">ID of terms of service</param>
public static Task<bool> Help_AcceptTermsOfService(this Client client, DataJSON id) public static Task<bool> Help_AcceptTermsOfService(this Client client, DataJSON id)
=> client.Invoke(new Help_AcceptTermsOfService => client.Invoke(new Help_AcceptTermsOfService
@ -3891,7 +3891,7 @@ namespace TL
user_id = user_id, user_id = user_id,
}); });
/// <summary>Internal use <para>See <a href="https://corefork.telegram.org/method/help.editUserInfo"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/help.editUserInfo#possible-errors">details</a>)</para></summary> /// <summary>Internal use <para>See <a href="https://corefork.telegram.org/method/help.editUserInfo"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/help.editUserInfo#possible-errors">details</a>)</para></summary>
/// <param name="user_id">User</param> /// <param name="user_id">User</param>
/// <param name="message">Message</param> /// <param name="message">Message</param>
/// <param name="entities"><a href="https://corefork.telegram.org/api/entities">Message entities for styled text</a></param> /// <param name="entities"><a href="https://corefork.telegram.org/api/entities">Message entities for styled text</a></param>
@ -3945,7 +3945,7 @@ namespace TL
{ {
}); });
/// <summary>Mark <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> history as read <para>See <a href="https://corefork.telegram.org/method/channels.readHistory"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.readHistory#possible-errors">details</a>)</para></summary> /// <summary>Mark <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> history as read <para>See <a href="https://corefork.telegram.org/method/channels.readHistory"/></para> <para>Possible <see cref="RpcException"/> codes: 400,406 (<a href="https://corefork.telegram.org/method/channels.readHistory#possible-errors">details</a>)</para></summary>
/// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a></param> /// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a></param>
/// <param name="max_id">ID of message up to which messages should be marked as read</param> /// <param name="max_id">ID of message up to which messages should be marked as read</param>
public static Task<bool> Channels_ReadHistory(this Client client, InputChannelBase channel, int max_id = default) public static Task<bool> Channels_ReadHistory(this Client client, InputChannelBase channel, int max_id = default)
@ -3955,7 +3955,7 @@ namespace TL
max_id = max_id, max_id = max_id,
}); });
/// <summary>Delete messages in a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> <para>See <a href="https://corefork.telegram.org/method/channels.deleteMessages"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/channels.deleteMessages#possible-errors">details</a>)</para></summary> /// <summary>Delete messages in a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> <para>See <a href="https://corefork.telegram.org/method/channels.deleteMessages"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/channels.deleteMessages#possible-errors">details</a>)</para></summary>
/// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a></param> /// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a></param>
/// <param name="id">IDs of messages to delete</param> /// <param name="id">IDs of messages to delete</param>
public static Task<Messages_AffectedMessages> Channels_DeleteMessages(this Client client, InputChannelBase channel, params int[] id) public static Task<Messages_AffectedMessages> Channels_DeleteMessages(this Client client, InputChannelBase channel, params int[] id)
@ -3977,7 +3977,7 @@ namespace TL
id = id, id = id,
}); });
/// <summary>Get <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> messages <para>See <a href="https://corefork.telegram.org/method/channels.getMessages"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.getMessages#possible-errors">details</a>)</para></summary> /// <summary>Get <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> messages <para>See <a href="https://corefork.telegram.org/method/channels.getMessages"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,406 (<a href="https://corefork.telegram.org/method/channels.getMessages#possible-errors">details</a>)</para></summary>
/// <param name="channel">Channel/supergroup</param> /// <param name="channel">Channel/supergroup</param>
/// <param name="id">IDs of messages to get</param> /// <param name="id">IDs of messages to get</param>
public static Task<Messages_MessagesBase> Channels_GetMessages(this Client client, InputChannelBase channel, params InputMessage[] id) public static Task<Messages_MessagesBase> Channels_GetMessages(this Client client, InputChannelBase channel, params InputMessage[] id)
@ -3987,7 +3987,7 @@ namespace TL
id = id, id = id,
}); });
/// <summary>Get the participants of a <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a> <para>See <a href="https://corefork.telegram.org/method/channels.getParticipants"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.getParticipants#possible-errors">details</a>)</para></summary> /// <summary>Get the participants of a <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a> <para>See <a href="https://corefork.telegram.org/method/channels.getParticipants"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/channels.getParticipants#possible-errors">details</a>)</para></summary>
/// <param name="channel">Channel</param> /// <param name="channel">Channel</param>
/// <param name="filter">Which participant types to fetch</param> /// <param name="filter">Which participant types to fetch</param>
/// <param name="offset"><a href="https://corefork.telegram.org/api/offsets">Offset</a></param> /// <param name="offset"><a href="https://corefork.telegram.org/api/offsets">Offset</a></param>
@ -4004,7 +4004,7 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary>Get info about a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> participant <para>See <a href="https://corefork.telegram.org/method/channels.getParticipant"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.getParticipant#possible-errors">details</a>)</para></summary> /// <summary>Get info about a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> participant <para>See <a href="https://corefork.telegram.org/method/channels.getParticipant"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/channels.getParticipant#possible-errors">details</a>)</para></summary>
/// <param name="channel">Channel/supergroup</param> /// <param name="channel">Channel/supergroup</param>
/// <param name="participant">Participant to get info about</param> /// <param name="participant">Participant to get info about</param>
public static Task<Channels_ChannelParticipant> Channels_GetParticipant(this Client client, InputChannelBase channel, InputPeer participant) public static Task<Channels_ChannelParticipant> Channels_GetParticipant(this Client client, InputChannelBase channel, InputPeer participant)
@ -4014,7 +4014,7 @@ namespace TL
participant = participant, participant = participant,
}); });
/// <summary>Get info about <a href="https://corefork.telegram.org/api/channel">channels/supergroups</a> <para>See <a href="https://corefork.telegram.org/method/channels.getChannels"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.getChannels#possible-errors">details</a>)</para></summary> /// <summary>Get info about <a href="https://corefork.telegram.org/api/channel">channels/supergroups</a> <para>See <a href="https://corefork.telegram.org/method/channels.getChannels"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,406 (<a href="https://corefork.telegram.org/method/channels.getChannels#possible-errors">details</a>)</para></summary>
/// <param name="id">IDs of channels/supergroups to get info about</param> /// <param name="id">IDs of channels/supergroups to get info about</param>
public static Task<Messages_Chats> Channels_GetChannels(this Client client, params InputChannelBase[] id) public static Task<Messages_Chats> Channels_GetChannels(this Client client, params InputChannelBase[] id)
=> client.Invoke(new Channels_GetChannels => client.Invoke(new Channels_GetChannels
@ -4111,7 +4111,7 @@ namespace TL
channel = channel, channel = channel,
}); });
/// <summary>Leave a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> <para>See <a href="https://corefork.telegram.org/method/channels.leaveChannel"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/channels.leaveChannel#possible-errors">details</a>)</para></summary> /// <summary>Leave a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> <para>See <a href="https://corefork.telegram.org/method/channels.leaveChannel"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/channels.leaveChannel#possible-errors">details</a>)</para></summary>
/// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a> to leave</param> /// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a> to leave</param>
public static Task<UpdatesBase> Channels_LeaveChannel(this Client client, InputChannelBase channel) public static Task<UpdatesBase> Channels_LeaveChannel(this Client client, InputChannelBase channel)
=> client.Invoke(new Channels_LeaveChannel => client.Invoke(new Channels_LeaveChannel
@ -4119,7 +4119,7 @@ namespace TL
channel = channel, channel = channel,
}); });
/// <summary>Invite users to a channel/supergroup <para>See <a href="https://corefork.telegram.org/method/channels.inviteToChannel"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/channels.inviteToChannel#possible-errors">details</a>)</para></summary> /// <summary>Invite users to a channel/supergroup <para>See <a href="https://corefork.telegram.org/method/channels.inviteToChannel"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/channels.inviteToChannel#possible-errors">details</a>)</para></summary>
/// <param name="channel">Channel/supergroup</param> /// <param name="channel">Channel/supergroup</param>
/// <param name="users">Users to invite</param> /// <param name="users">Users to invite</param>
public static Task<UpdatesBase> Channels_InviteToChannel(this Client client, InputChannelBase channel, params InputUserBase[] users) public static Task<UpdatesBase> Channels_InviteToChannel(this Client client, InputChannelBase channel, params InputUserBase[] users)
@ -4169,7 +4169,7 @@ namespace TL
flags = (Channels_GetAdminedPublicChannels.Flags)((by_location ? 0x1 : 0) | (check_limit ? 0x2 : 0)), flags = (Channels_GetAdminedPublicChannels.Flags)((by_location ? 0x1 : 0) | (check_limit ? 0x2 : 0)),
}); });
/// <summary>Ban/unban/kick a user in a <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a>. <para>See <a href="https://corefork.telegram.org/method/channels.editBanned"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/channels.editBanned#possible-errors">details</a>)</para></summary> /// <summary>Ban/unban/kick a user in a <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a>. <para>See <a href="https://corefork.telegram.org/method/channels.editBanned"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/channels.editBanned#possible-errors">details</a>)</para></summary>
/// <param name="channel">The <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a>.</param> /// <param name="channel">The <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a>.</param>
/// <param name="participant">Participant to ban</param> /// <param name="participant">Participant to ban</param>
/// <param name="banned_rights">The banned rights</param> /// <param name="banned_rights">The banned rights</param>
@ -4181,7 +4181,7 @@ namespace TL
banned_rights = banned_rights, banned_rights = banned_rights,
}); });
/// <summary>Get the admin log of a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> <para>See <a href="https://corefork.telegram.org/method/channels.getAdminLog"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/channels.getAdminLog#possible-errors">details</a>)</para></summary> /// <summary>Get the admin log of a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> <para>See <a href="https://corefork.telegram.org/method/channels.getAdminLog"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403,406 (<a href="https://corefork.telegram.org/method/channels.getAdminLog#possible-errors">details</a>)</para></summary>
/// <param name="channel">Channel</param> /// <param name="channel">Channel</param>
/// <param name="q">Search query, can be empty</param> /// <param name="q">Search query, can be empty</param>
/// <param name="events_filter">Event filter</param> /// <param name="events_filter">Event filter</param>
@ -4212,7 +4212,7 @@ namespace TL
stickerset = stickerset, stickerset = stickerset,
}); });
/// <summary>Mark <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> message contents as read <para>See <a href="https://corefork.telegram.org/method/channels.readMessageContents"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.readMessageContents#possible-errors">details</a>)</para></summary> /// <summary>Mark <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> message contents as read <para>See <a href="https://corefork.telegram.org/method/channels.readMessageContents"/></para> <para>Possible <see cref="RpcException"/> codes: 400,406 (<a href="https://corefork.telegram.org/method/channels.readMessageContents#possible-errors">details</a>)</para></summary>
/// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a></param> /// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Channel/supergroup</a></param>
/// <param name="id">IDs of messages whose contents should be marked as read</param> /// <param name="id">IDs of messages whose contents should be marked as read</param>
public static Task<bool> Channels_ReadMessageContents(this Client client, InputChannelBase channel, params int[] id) public static Task<bool> Channels_ReadMessageContents(this Client client, InputChannelBase channel, params int[] id)
@ -4363,7 +4363,7 @@ namespace TL
enabled = enabled, enabled = enabled,
}); });
/// <summary>Set whether all users should <a href="https://corefork.telegram.org/api/invites#join-requests">request admin approval to join the group »</a>. <para>See <a href="https://corefork.telegram.org/method/channels.toggleJoinRequest"/></para></summary> /// <summary>Set whether all users should <a href="https://corefork.telegram.org/api/invites#join-requests">request admin approval to join the group »</a>. <para>See <a href="https://corefork.telegram.org/method/channels.toggleJoinRequest"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.toggleJoinRequest#possible-errors">details</a>)</para></summary>
/// <param name="channel">Group</param> /// <param name="channel">Group</param>
/// <param name="enabled">Toggle</param> /// <param name="enabled">Toggle</param>
public static Task<UpdatesBase> Channels_ToggleJoinRequest(this Client client, InputChannelBase channel, bool enabled) public static Task<UpdatesBase> Channels_ToggleJoinRequest(this Client client, InputChannelBase channel, bool enabled)
@ -4373,7 +4373,7 @@ namespace TL
enabled = enabled, enabled = enabled,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.reorderUsernames"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.reorderUsernames"/> [bots: ✓]</para></summary>
public static Task<bool> Channels_ReorderUsernames(this Client client, InputChannelBase channel, params string[] order) public static Task<bool> Channels_ReorderUsernames(this Client client, InputChannelBase channel, params string[] order)
=> client.Invoke(new Channels_ReorderUsernames => client.Invoke(new Channels_ReorderUsernames
{ {
@ -4381,7 +4381,7 @@ namespace TL
order = order, order = order,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleUsername"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleUsername"/> [bots: ✓]</para></summary>
public static Task<bool> Channels_ToggleUsername(this Client client, InputChannelBase channel, string username, bool active) public static Task<bool> Channels_ToggleUsername(this Client client, InputChannelBase channel, string username, bool active)
=> client.Invoke(new Channels_ToggleUsername => client.Invoke(new Channels_ToggleUsername
{ {
@ -4390,14 +4390,14 @@ namespace TL
active = active, active = active,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.deactivateAllUsernames"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.deactivateAllUsernames"/> [bots: ✓]</para></summary>
public static Task<bool> Channels_DeactivateAllUsernames(this Client client, InputChannelBase channel) public static Task<bool> Channels_DeactivateAllUsernames(this Client client, InputChannelBase channel)
=> client.Invoke(new Channels_DeactivateAllUsernames => client.Invoke(new Channels_DeactivateAllUsernames
{ {
channel = channel, channel = channel,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleForum"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleForum"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.toggleForum#possible-errors">details</a>)</para></summary>
public static Task<UpdatesBase> Channels_ToggleForum(this Client client, InputChannelBase channel, bool enabled) public static Task<UpdatesBase> Channels_ToggleForum(this Client client, InputChannelBase channel, bool enabled)
=> client.Invoke(new Channels_ToggleForum => client.Invoke(new Channels_ToggleForum
{ {
@ -4405,7 +4405,7 @@ namespace TL
enabled = enabled, enabled = enabled,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.createForumTopic"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.createForumTopic"/> [bots: ✓]</para></summary>
public static Task<UpdatesBase> Channels_CreateForumTopic(this Client client, InputChannelBase channel, string title, long random_id, int? icon_color = null, long? icon_emoji_id = null, InputPeer send_as = null) public static Task<UpdatesBase> Channels_CreateForumTopic(this Client client, InputChannelBase channel, string title, long random_id, int? icon_color = null, long? icon_emoji_id = null, InputPeer send_as = null)
=> client.Invoke(new Channels_CreateForumTopic => client.Invoke(new Channels_CreateForumTopic
{ {
@ -4418,7 +4418,7 @@ namespace TL
send_as = send_as, send_as = send_as,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.getForumTopics"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.getForumTopics"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.getForumTopics#possible-errors">details</a>)</para></summary>
public static Task<Messages_ForumTopics> Channels_GetForumTopics(this Client client, InputChannelBase channel, DateTime offset_date = default, int offset_id = default, int offset_topic = default, int limit = int.MaxValue, string q = null) public static Task<Messages_ForumTopics> Channels_GetForumTopics(this Client client, InputChannelBase channel, DateTime offset_date = default, int offset_id = default, int offset_topic = default, int limit = int.MaxValue, string q = null)
=> client.Invoke(new Channels_GetForumTopics => client.Invoke(new Channels_GetForumTopics
{ {
@ -4431,7 +4431,7 @@ namespace TL
limit = limit, limit = limit,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.getForumTopicsByID"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.getForumTopicsByID"/> [bots: ✓]</para></summary>
public static Task<Messages_ForumTopics> Channels_GetForumTopicsByID(this Client client, InputChannelBase channel, params int[] topics) public static Task<Messages_ForumTopics> Channels_GetForumTopicsByID(this Client client, InputChannelBase channel, params int[] topics)
=> client.Invoke(new Channels_GetForumTopicsByID => client.Invoke(new Channels_GetForumTopicsByID
{ {
@ -4439,7 +4439,7 @@ namespace TL
topics = topics, topics = topics,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.editForumTopic"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.editForumTopic"/> [bots: ✓]</para></summary>
public static Task<UpdatesBase> Channels_EditForumTopic(this Client client, InputChannelBase channel, int topic_id, string title = null, long? icon_emoji_id = null, bool? closed = default, bool? hidden = default) public static Task<UpdatesBase> Channels_EditForumTopic(this Client client, InputChannelBase channel, int topic_id, string title = null, long? icon_emoji_id = null, bool? closed = default, bool? hidden = default)
=> client.Invoke(new Channels_EditForumTopic => client.Invoke(new Channels_EditForumTopic
{ {
@ -4452,7 +4452,7 @@ namespace TL
hidden = hidden.GetValueOrDefault(), hidden = hidden.GetValueOrDefault(),
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.updatePinnedForumTopic"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.updatePinnedForumTopic"/> [bots: ✓]</para></summary>
public static Task<UpdatesBase> Channels_UpdatePinnedForumTopic(this Client client, InputChannelBase channel, int topic_id, bool pinned) public static Task<UpdatesBase> Channels_UpdatePinnedForumTopic(this Client client, InputChannelBase channel, int topic_id, bool pinned)
=> client.Invoke(new Channels_UpdatePinnedForumTopic => client.Invoke(new Channels_UpdatePinnedForumTopic
{ {
@ -4461,7 +4461,7 @@ namespace TL
pinned = pinned, pinned = pinned,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.deleteTopicHistory"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.deleteTopicHistory"/> [bots: ✓]</para></summary>
public static Task<Messages_AffectedHistory> Channels_DeleteTopicHistory(this Client client, InputChannelBase channel, int top_msg_id) public static Task<Messages_AffectedHistory> Channels_DeleteTopicHistory(this Client client, InputChannelBase channel, int top_msg_id)
=> client.Invoke(new Channels_DeleteTopicHistory => client.Invoke(new Channels_DeleteTopicHistory
{ {
@ -4469,7 +4469,7 @@ namespace TL
top_msg_id = top_msg_id, top_msg_id = top_msg_id,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.reorderPinnedForumTopics"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.reorderPinnedForumTopics"/> [bots: ✓]</para></summary>
public static Task<UpdatesBase> Channels_ReorderPinnedForumTopics(this Client client, InputChannelBase channel, int[] order, bool force = false) public static Task<UpdatesBase> Channels_ReorderPinnedForumTopics(this Client client, InputChannelBase channel, int[] order, bool force = false)
=> client.Invoke(new Channels_ReorderPinnedForumTopics => client.Invoke(new Channels_ReorderPinnedForumTopics
{ {
@ -4478,7 +4478,7 @@ namespace TL
order = order, order = order,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleAntiSpam"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleAntiSpam"/> [bots: ✓]</para></summary>
public static Task<UpdatesBase> Channels_ToggleAntiSpam(this Client client, InputChannelBase channel, bool enabled) public static Task<UpdatesBase> Channels_ToggleAntiSpam(this Client client, InputChannelBase channel, bool enabled)
=> client.Invoke(new Channels_ToggleAntiSpam => client.Invoke(new Channels_ToggleAntiSpam
{ {
@ -4486,7 +4486,7 @@ namespace TL
enabled = enabled, enabled = enabled,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.reportAntiSpamFalsePositive"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.reportAntiSpamFalsePositive"/> [bots: ✓]</para></summary>
public static Task<bool> Channels_ReportAntiSpamFalsePositive(this Client client, InputChannelBase channel, int msg_id) public static Task<bool> Channels_ReportAntiSpamFalsePositive(this Client client, InputChannelBase channel, int msg_id)
=> client.Invoke(new Channels_ReportAntiSpamFalsePositive => client.Invoke(new Channels_ReportAntiSpamFalsePositive
{ {
@ -4494,7 +4494,7 @@ namespace TL
msg_id = msg_id, msg_id = msg_id,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleParticipantsHidden"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/channels.toggleParticipantsHidden"/> [bots: ✓]</para></summary>
public static Task<UpdatesBase> Channels_ToggleParticipantsHidden(this Client client, InputChannelBase channel, bool enabled) public static Task<UpdatesBase> Channels_ToggleParticipantsHidden(this Client client, InputChannelBase channel, bool enabled)
=> client.Invoke(new Channels_ToggleParticipantsHidden => client.Invoke(new Channels_ToggleParticipantsHidden
{ {
@ -4589,7 +4589,7 @@ namespace TL
admin_rights = admin_rights, admin_rights = admin_rights,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/bots.setBotInfo"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/bots.setBotInfo"/> [bots: ✓]</para></summary>
public static Task<bool> Bots_SetBotInfo(this Client client, string lang_code, string about = null, string description = null) public static Task<bool> Bots_SetBotInfo(this Client client, string lang_code, string about = null, string description = null)
=> client.Invoke(new Bots_SetBotInfo => client.Invoke(new Bots_SetBotInfo
{ {
@ -4599,7 +4599,7 @@ namespace TL
description = description, description = description,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/bots.getBotInfo"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/bots.getBotInfo"/> [bots: ✓]</para></summary>
public static Task<string[]> Bots_GetBotInfo(this Client client, string lang_code) public static Task<string[]> Bots_GetBotInfo(this Client client, string lang_code)
=> client.Invoke(new Bots_GetBotInfo => client.Invoke(new Bots_GetBotInfo
{ {
@ -4760,7 +4760,7 @@ namespace TL
position = position, position = position,
}); });
/// <summary>Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot. <para>See <a href="https://corefork.telegram.org/method/stickers.addStickerToSet"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stickers.addStickerToSet#possible-errors">details</a>)</para></summary> /// <summary>Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot. <para>See <a href="https://corefork.telegram.org/method/stickers.addStickerToSet"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,406 (<a href="https://corefork.telegram.org/method/stickers.addStickerToSet#possible-errors">details</a>)</para></summary>
/// <param name="stickerset">The stickerset</param> /// <param name="stickerset">The stickerset</param>
/// <param name="sticker">The sticker</param> /// <param name="sticker">The sticker</param>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.stickerSetNotModified">messages.stickerSetNotModified</a></returns> /// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.stickerSetNotModified">messages.stickerSetNotModified</a></returns>
@ -4800,7 +4800,7 @@ namespace TL
title = title, title = title,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/stickers.changeSticker"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/stickers.changeSticker"/> [bots: ✓]</para></summary>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.stickerSetNotModified">messages.stickerSetNotModified</a></returns> /// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.stickerSetNotModified">messages.stickerSetNotModified</a></returns>
public static Task<Messages_StickerSet> Stickers_ChangeSticker(this Client client, InputDocument sticker, string emoji = null, MaskCoords mask_coords = null, string keywords = null) public static Task<Messages_StickerSet> Stickers_ChangeSticker(this Client client, InputDocument sticker, string emoji = null, MaskCoords mask_coords = null, string keywords = null)
=> client.Invoke(new Stickers_ChangeSticker => client.Invoke(new Stickers_ChangeSticker
@ -4812,7 +4812,7 @@ namespace TL
keywords = keywords, keywords = keywords,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/stickers.renameStickerSet"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/stickers.renameStickerSet"/> [bots: ✓]</para></summary>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.stickerSetNotModified">messages.stickerSetNotModified</a></returns> /// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.stickerSetNotModified">messages.stickerSetNotModified</a></returns>
public static Task<Messages_StickerSet> Stickers_RenameStickerSet(this Client client, InputStickerSet stickerset, string title) public static Task<Messages_StickerSet> Stickers_RenameStickerSet(this Client client, InputStickerSet stickerset, string title)
=> client.Invoke(new Stickers_RenameStickerSet => client.Invoke(new Stickers_RenameStickerSet
@ -4821,7 +4821,7 @@ namespace TL
title = title, title = title,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/stickers.deleteStickerSet"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/stickers.deleteStickerSet"/> [bots: ✓]</para></summary>
public static Task<bool> Stickers_DeleteStickerSet(this Client client, InputStickerSet stickerset) public static Task<bool> Stickers_DeleteStickerSet(this Client client, InputStickerSet stickerset)
=> client.Invoke(new Stickers_DeleteStickerSet => client.Invoke(new Stickers_DeleteStickerSet
{ {
@ -4987,7 +4987,7 @@ namespace TL
users = users, users = users,
}); });
/// <summary>Terminate a group call <para>See <a href="https://corefork.telegram.org/method/phone.discardGroupCall"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/phone.discardGroupCall#possible-errors">details</a>)</para></summary> /// <summary>Terminate a group call <para>See <a href="https://corefork.telegram.org/method/phone.discardGroupCall"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/phone.discardGroupCall#possible-errors">details</a>)</para></summary>
/// <param name="call">The group call to terminate</param> /// <param name="call">The group call to terminate</param>
public static Task<UpdatesBase> Phone_DiscardGroupCall(this Client client, InputGroupCall call) public static Task<UpdatesBase> Phone_DiscardGroupCall(this Client client, InputGroupCall call)
=> client.Invoke(new Phone_DiscardGroupCall => client.Invoke(new Phone_DiscardGroupCall
@ -5251,7 +5251,7 @@ namespace TL
folder_id = folder_id, folder_id = folder_id,
}); });
/// <summary>Get <a href="https://corefork.telegram.org/api/stats">channel statistics</a> <para>See <a href="https://corefork.telegram.org/method/stats.getBroadcastStats"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stats.getBroadcastStats#possible-errors">details</a>)</para></summary> /// <summary>Get <a href="https://corefork.telegram.org/api/stats">channel statistics</a> <para>See <a href="https://corefork.telegram.org/method/stats.getBroadcastStats"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/stats.getBroadcastStats#possible-errors">details</a>)</para></summary>
/// <param name="dark">Whether to enable dark theme for graph colors</param> /// <param name="dark">Whether to enable dark theme for graph colors</param>
/// <param name="channel">The channel</param> /// <param name="channel">The channel</param>
public static Task<Stats_BroadcastStats> Stats_GetBroadcastStats(this Client client, InputChannelBase channel, bool dark = false) public static Task<Stats_BroadcastStats> Stats_GetBroadcastStats(this Client client, InputChannelBase channel, bool dark = false)
@ -5272,7 +5272,7 @@ namespace TL
x = x.GetValueOrDefault(), x = x.GetValueOrDefault(),
}); });
/// <summary>Get <a href="https://corefork.telegram.org/api/stats">supergroup statistics</a> <para>See <a href="https://corefork.telegram.org/method/stats.getMegagroupStats"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stats.getMegagroupStats#possible-errors">details</a>)</para></summary> /// <summary>Get <a href="https://corefork.telegram.org/api/stats">supergroup statistics</a> <para>See <a href="https://corefork.telegram.org/method/stats.getMegagroupStats"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/stats.getMegagroupStats#possible-errors">details</a>)</para></summary>
/// <param name="dark">Whether to enable dark theme for graph colors</param> /// <param name="dark">Whether to enable dark theme for graph colors</param>
/// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Supergroup ID</a></param> /// <param name="channel"><a href="https://corefork.telegram.org/api/channel">Supergroup ID</a></param>
public static Task<Stats_MegagroupStats> Stats_GetMegagroupStats(this Client client, InputChannelBase channel, bool dark = false) public static Task<Stats_MegagroupStats> Stats_GetMegagroupStats(this Client client, InputChannelBase channel, bool dark = false)

View file

@ -6,7 +6,7 @@ namespace TL
{ {
public static class Layer public static class Layer
{ {
public const int Version = 155; // fetched 09/03/2023 20:45:49 public const int Version = 155; // fetched 13/03/2023 22:46:30
internal const int SecretChats = 144; internal const int SecretChats = 144;
internal const int MTProto2 = 73; internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415; internal const uint VectorCtor = 0x1CB5C415;