Replaced *Default & *None structures with null

This commit is contained in:
Wizou 2022-10-26 14:26:22 +02:00
parent cc9cf16f8a
commit 1a3cde4241
5 changed files with 45 additions and 49 deletions

19
FAQ.md
View file

@ -139,8 +139,8 @@ Here are some advices from [another similar library](https://github.com/gotd/td/
Some additional advices from me: Some additional advices from me:
5. Avoid repetitive polling or repetitive sequence of actions/requests: Save the initial results of your queries, and update those results when you're informed of a change through `OnUpdate` events. 5. Avoid repetitive polling or repetitive sequence of actions/requests: Save the initial results of your queries, and update those results when you're informed of a change through `OnUpdate` events.
6. If a phone number is brand new, it will be closely monitored by Telegram for abuse, and it can even already be considered a bad user due to bad behavior from the previous owner of that phone number (which may happens often with VoIP or other easy-to-buy-online numbers, so expect fast ban) 6. Don't buy fake user accounts/sessions and don't extract api_id/hash/authkey/sessions from official clients, this is [specifically forbidden by API TOS](https://core.telegram.org/api/terms#2-transparency). You must use your own api_id and create your own sessions associated with it.
7. Don't buy fake users/session accounts from Internet and don't extract api_id/hash/authkey/sessions from official clients, this is [specifically forbidden by API TOS](https://core.telegram.org/api/terms#2-transparency). 7. If a phone number is brand new, it will be closely monitored by Telegram for abuse, and it can even already be considered a bad user due to bad behavior from the previous owner of that phone number (which may happens often with VoIP or other easy-to-buy-online numbers, so expect fast ban)
8. You may want to use your new phone number account with an official Telegram client and act like a normal user for some time (some weeks/months), before using it for automation with WTelegramClient. 8. You may want to use your new phone number account with an official Telegram client and act like a normal user for some time (some weeks/months), before using it for automation with WTelegramClient.
9. When creating a new API ID/Hash, I recommend you use your own phone number with long history of normal Telegram usage, rather than a brand new phone number with short history. 9. When creating a new API ID/Hash, I recommend you use your own phone number with long history of normal Telegram usage, rather than a brand new phone number with short history.
In particular, DON'T create an API ID/Hash for every phone numbers you will control. One API ID/Hash represents your application, which can be used to control several user accounts. In particular, DON'T create an API ID/Hash for every phone numbers you will control. One API ID/Hash represents your application, which can be used to control several user accounts.
@ -164,23 +164,24 @@ That object must be created with both fields `channel_id` and `access_hash` corr
<a name="chats-chats"></a> <a name="chats-chats"></a>
<a name="chat-not-found"></a> <a name="chat-not-found"></a>
#### 10. `chats.chats[id]` fails. My chats list is empty or does not contain the chat id. #### 10. `chats.chats[id]` fails. My chats list is empty or does not contain the chat I'm looking for.
There can be several reasons why `chats.chats` doesn't contain the chat you expect: There can be several reasons why `chats.chats` doesn't contain the chat you expect:
- The currently logged-in user account has not joined this particular chat.
API method [Messages_GetAllChats](https://corefork.telegram.org/method/messages.getAllChats) will only return those chat groups/channels the user is in, not all Telegram chat groups.
- You're trying to use a Bot API (or TDLib) numerical ID, like -1001234567890
Telegram Client API don't use these kind of IDs for chats. Remove the -100 prefix and try again with the rest (1234567890).
- You're searching for a user instead of a chat ID. - You're searching for a user instead of a chat ID.
Private messages with a user are not called "chats". See [Terminology in ReadMe](README.md#terminology). Private messages with a user are not called "chats". See [Terminology in ReadMe](README.md#terminology).
To obtain the list of users (as well as chats and channels) the logged-in user is currenly engaged in a discussion with, you should [use the API method Messages_GetAllDialogs](EXAMPLES.md#list-dialogs) To obtain the list of users (as well as chats and channels) the logged-in user is currenly engaged in a discussion with, you should [use the API method `Messages_GetAllDialogs`](EXAMPLES.md#list-dialogs)
- The currently logged-in user account has not joined this particular chat.
API method [`Messages_GetAllChats`](https://corefork.telegram.org/method/messages.getAllChats) will only return those chat groups/channels the user is in, not all Telegram chat groups.
If you're looking for other Telegram groups/channels/users, try API methods [`Contacts_ResolveUsername`](EXAMPLES.md#msg-by-name) or `Contacts_Search`
- You're trying to use a Bot API (or TDLib) numerical ID, like -1001234567890
Telegram Client API don't use these kind of IDs for chats. Remove the -100 prefix and try again with the rest (1234567890).
- the `chats.chats` dictionary is empty. - the `chats.chats` dictionary is empty.
This is the case if you are logged-in as a brand new user account (that hasn't join any chat groups/channels) This is the case if you are logged-in as a brand new user account (that hasn't join any chat groups/channels)
or if you are connected to a Test DC (a Telegram datacenter server for tests) instead of Production DC or if you are connected to a Test DC (a Telegram datacenter server for tests) instead of Production DC
([read FAQ #6](#wrong-server) for more) ([read FAQ #6](#wrong-server) for more)
To help determine if `chats.chats` is empty or does not contain a certain chat, you should [dump the chat list to the screen](EXAMPLES.md#list-chats) To help determine if `chats.chats` is empty or does not contain a certain chat, you should [dump the chat list to the screen](EXAMPLES.md#list-chats)
or simply use a debugger: Place a breakpoint after the Messages_GetAllChats call, run the program up to there, and use a Watch pane to display the content of the chats.chats dictionary. or simply use a debugger: Place a breakpoint after the `Messages_GetAllChats` call, run the program up to there, and use a Watch pane to display the content of the chats.chats dictionary.
<a name="shutdown"></a> <a name="shutdown"></a>
#### 11. I get "Connection shut down" errors in my logs #### 11. I get "Connection shut down" errors in my logs

View file

@ -58,7 +58,7 @@ namespace TL
{ {
public abstract InputEncryptedFileBase ToInputEncryptedFile(int key_fingerprint); public abstract InputEncryptedFileBase ToInputEncryptedFile(int key_fingerprint);
public abstract InputSecureFileBase ToInputSecureFile(byte[] file_hash, byte[] secret); public abstract InputSecureFileBase ToInputSecureFile(byte[] file_hash, byte[] secret);
/// <param name="isSquareVideo10s"><see langword="false"/> for a profile photo. <see langword="null"/> for auto-detection<br/><see langword="true"/> for a profile video. The video <u>MUST</u> be square and 10 seconds max</param> /// <param name="isSquareVideo10s"><see langword="false"/> for a profile photo. <see langword="null"/> for auto-detection<br/><see langword="true"/> for a profile video. The video <u>MUST</u> be square, 10 seconds max, larger than 160x160</param>
public InputChatUploadedPhoto ToInputChatPhoto(bool? isSquareVideo10s = null) public InputChatUploadedPhoto ToInputChatPhoto(bool? isSquareVideo10s = null)
{ {
if (isSquareVideo10s ?? Path.GetExtension(Name)?.ToLowerInvariant() is ".mp4") if (isSquareVideo10s ?? Path.GetExtension(Name)?.ToLowerInvariant() is ".mp4")

View file

@ -3870,7 +3870,7 @@ namespace TL
/// <summary><a href="https://corefork.telegram.org/api/folders">Folder</a> ID</summary> /// <summary><a href="https://corefork.telegram.org/api/folders">Folder</a> ID</summary>
public int id; public int id;
/// <summary><a href="https://corefork.telegram.org/api/folders">Folder</a> info</summary> /// <summary><a href="https://corefork.telegram.org/api/folders">Folder</a> info</summary>
[IfFlag(0)] public DialogFilterBase filter; [IfFlag(0)] public DialogFilter filter;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -6306,7 +6306,7 @@ namespace TL
public class KeyboardButtonBuy : KeyboardButton public class KeyboardButtonBuy : KeyboardButton
{ {
} }
/// <summary>Button to request a user to authorize via URL using <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">Seamless Telegram Login</a>. When the user clicks on such a button, <a href="https://corefork.telegram.org/method/messages.requestUrlAuth">messages.requestUrlAuth</a> should be called, providing the <c>button_id</c> and the ID of the container message. The returned <see cref="UrlAuthResultRequest"/> object will contain more details about the authorization request (<c>request_write_access</c> if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call <a href="https://corefork.telegram.org/method/messages.acceptUrlAuth">messages.acceptUrlAuth</a> to get a <see cref="UrlAuthResultAccepted"/> with the URL to open instead of the <c>url</c> of this constructor, or a <see cref="UrlAuthResultDefault"/>, in which case the <c>url</c> of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the <c>url</c> of this constructor must be used. <para>See <a href="https://corefork.telegram.org/constructor/keyboardButtonUrlAuth"/></para></summary> /// <summary>Button to request a user to authorize via URL using <a href="https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots">Seamless Telegram Login</a>. When the user clicks on such a button, <a href="https://corefork.telegram.org/method/messages.requestUrlAuth">messages.requestUrlAuth</a> should be called, providing the <c>button_id</c> and the ID of the container message. The returned <see cref="UrlAuthResultRequest"/> object will contain more details about the authorization request (<c>request_write_access</c> if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call <a href="https://corefork.telegram.org/method/messages.acceptUrlAuth">messages.acceptUrlAuth</a> to get a <see cref="UrlAuthResultAccepted"/> with the URL to open instead of the <c>url</c> of this constructor, or a <see langword="null"/>, in which case the <c>url</c> of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the <c>url</c> of this constructor must be used. <para>See <a href="https://corefork.telegram.org/constructor/keyboardButtonUrlAuth"/></para></summary>
[TLDef(0x10B78D29)] [TLDef(0x10B78D29)]
public class KeyboardButtonUrlAuth : KeyboardButtonBase public class KeyboardButtonUrlAuth : KeyboardButtonBase
{ {
@ -11332,7 +11332,8 @@ namespace TL
} }
} }
/// <summary>URL authorization result <para>Derived classes: <see cref="UrlAuthResultRequest"/>, <see cref="UrlAuthResultAccepted"/>, <see cref="UrlAuthResultDefault"/></para> <para>See <a href="https://corefork.telegram.org/type/UrlAuthResult"/></para></summary> /// <summary>URL authorization result <para>Derived classes: <see cref="UrlAuthResultRequest"/>, <see cref="UrlAuthResultAccepted"/></para> <para>See <a href="https://corefork.telegram.org/type/UrlAuthResult"/></para></summary>
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/urlAuthResultDefault">urlAuthResultDefault</a></remarks>
public abstract class UrlAuthResult : IObject { } public abstract class UrlAuthResult : IObject { }
/// <summary>Details about the authorization request, for more info <a href="https://corefork.telegram.org/api/url-authorization">click here »</a> <para>See <a href="https://corefork.telegram.org/constructor/urlAuthResultRequest"/></para></summary> /// <summary>Details about the authorization request, for more info <a href="https://corefork.telegram.org/api/url-authorization">click here »</a> <para>See <a href="https://corefork.telegram.org/constructor/urlAuthResultRequest"/></para></summary>
[TLDef(0x92D33A0E)] [TLDef(0x92D33A0E)]
@ -11358,9 +11359,6 @@ namespace TL
/// <summary>The URL name of the website on which the user has logged in.</summary> /// <summary>The URL name of the website on which the user has logged in.</summary>
public string url; public string url;
} }
/// <summary>Details about an accepted authorization request, for more info <a href="https://corefork.telegram.org/api/url-authorization">click here »</a> <para>See <a href="https://corefork.telegram.org/constructor/urlAuthResultDefault"/></para></summary>
[TLDef(0xA9D6DB1F)]
public class UrlAuthResultDefault : UrlAuthResult { }
/// <summary>Geographical location of supergroup (geogroups) <para>See <a href="https://corefork.telegram.org/constructor/channelLocation"/></para></summary> /// <summary>Geographical location of supergroup (geogroups) <para>See <a href="https://corefork.telegram.org/constructor/channelLocation"/></para></summary>
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/channelLocationEmpty">channelLocationEmpty</a></remarks> /// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/channelLocationEmpty">channelLocationEmpty</a></remarks>
@ -11742,11 +11740,10 @@ namespace TL
public BankCardOpenUrl[] open_urls; public BankCardOpenUrl[] open_urls;
} }
/// <summary>Dialog filter (<a href="https://corefork.telegram.org/api/folders">folder »</a>) <para>Derived classes: <see cref="DialogFilter"/>, <see cref="DialogFilterDefault"/></para> <para>See <a href="https://corefork.telegram.org/type/DialogFilter"/></para></summary>
public abstract class DialogFilterBase : IObject { }
/// <summary>Dialog filter AKA <a href="https://corefork.telegram.org/api/folders">folder</a> <para>See <a href="https://corefork.telegram.org/constructor/dialogFilter"/></para></summary> /// <summary>Dialog filter AKA <a href="https://corefork.telegram.org/api/folders">folder</a> <para>See <a href="https://corefork.telegram.org/constructor/dialogFilter"/></para></summary>
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/dialogFilterDefault">dialogFilterDefault</a></remarks>
[TLDef(0x7438F7E8)] [TLDef(0x7438F7E8)]
public class DialogFilter : DialogFilterBase public class DialogFilter : IObject
{ {
/// <summary>Flags, see <a href="https://corefork.telegram.org/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></summary> /// <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;
@ -11785,16 +11782,13 @@ namespace TL
has_emoticon = 0x2000000, has_emoticon = 0x2000000,
} }
} }
/// <summary>Used only when reordering folders to indicate the default (all chats) folder. <para>See <a href="https://corefork.telegram.org/constructor/dialogFilterDefault"/></para></summary>
[TLDef(0x363293AE)]
public class DialogFilterDefault : DialogFilterBase { }
/// <summary>Suggested <a href="https://corefork.telegram.org/api/folders">folders</a> <para>See <a href="https://corefork.telegram.org/constructor/dialogFilterSuggested"/></para></summary> /// <summary>Suggested <a href="https://corefork.telegram.org/api/folders">folders</a> <para>See <a href="https://corefork.telegram.org/constructor/dialogFilterSuggested"/></para></summary>
[TLDef(0x77744D4A)] [TLDef(0x77744D4A)]
public class DialogFilterSuggested : IObject public class DialogFilterSuggested : IObject
{ {
/// <summary><a href="https://corefork.telegram.org/api/folders">Folder info</a></summary> /// <summary><a href="https://corefork.telegram.org/api/folders">Folder info</a></summary>
public DialogFilterBase filter; public DialogFilter filter;
/// <summary><a href="https://corefork.telegram.org/api/folders">Folder</a> description</summary> /// <summary><a href="https://corefork.telegram.org/api/folders">Folder</a> description</summary>
public string description; public string description;
} }
@ -12705,11 +12699,9 @@ namespace TL
public string short_name; public string short_name;
} }
/// <summary>Represents a scope where the bot commands, specified using <a href="https://corefork.telegram.org/method/bots.setBotCommands">bots.setBotCommands</a> will be valid. <para>Derived classes: <see cref="BotCommandScopeDefault"/>, <see cref="BotCommandScopeUsers"/>, <see cref="BotCommandScopeChats"/>, <see cref="BotCommandScopeChatAdmins"/>, <see cref="BotCommandScopePeer"/>, <see cref="BotCommandScopePeerAdmins"/>, <see cref="BotCommandScopePeerUser"/></para> <para>See <a href="https://corefork.telegram.org/type/BotCommandScope"/></para></summary> /// <summary>Represents a scope where the bot commands, specified using <a href="https://corefork.telegram.org/method/bots.setBotCommands">bots.setBotCommands</a> will be valid. <para>Derived classes: <see cref="BotCommandScopeUsers"/>, <see cref="BotCommandScopeChats"/>, <see cref="BotCommandScopeChatAdmins"/>, <see cref="BotCommandScopePeer"/>, <see cref="BotCommandScopePeerAdmins"/>, <see cref="BotCommandScopePeerUser"/></para> <para>See <a href="https://corefork.telegram.org/type/BotCommandScope"/></para></summary>
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/botCommandScopeDefault">botCommandScopeDefault</a></remarks>
public abstract class BotCommandScope : IObject { } public abstract class BotCommandScope : IObject { }
/// <summary>The commands will be valid in all dialogs <para>See <a href="https://corefork.telegram.org/constructor/botCommandScopeDefault"/></para></summary>
[TLDef(0x2F6CB2AB)]
public class BotCommandScopeDefault : BotCommandScope { }
/// <summary>The specified bot commands will only be valid in all private chats with users. <para>See <a href="https://corefork.telegram.org/constructor/botCommandScopeUsers"/></para></summary> /// <summary>The specified bot commands will only be valid in all private chats with users. <para>See <a href="https://corefork.telegram.org/constructor/botCommandScopeUsers"/></para></summary>
[TLDef(0x3C4F04D8)] [TLDef(0x3C4F04D8)]
public class BotCommandScopeUsers : BotCommandScope { } public class BotCommandScopeUsers : BotCommandScope { }
@ -13234,11 +13226,9 @@ namespace TL
} }
} }
/// <summary>Indicates the action to execute when pressing the in-UI menu button for bots <para>Derived classes: <see cref="BotMenuButtonDefault"/>, <see cref="BotMenuButtonCommands"/>, <see cref="BotMenuButton"/></para> <para>See <a href="https://corefork.telegram.org/type/BotMenuButton"/></para></summary> /// <summary>Indicates the action to execute when pressing the in-UI menu button for bots <para>Derived classes: <see cref="BotMenuButtonCommands"/>, <see cref="BotMenuButton"/></para> <para>See <a href="https://corefork.telegram.org/type/BotMenuButton"/></para></summary>
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/botMenuButtonDefault">botMenuButtonDefault</a></remarks>
public abstract class BotMenuButtonBase : IObject { } public abstract class BotMenuButtonBase : IObject { }
/// <summary>Placeholder <a href="https://corefork.telegram.org/api/bots/menu">bot menu button</a> never returned to users: see <a href="https://corefork.telegram.org/api/bots/menu">the docs for more info</a>. <para>See <a href="https://corefork.telegram.org/constructor/botMenuButtonDefault"/></para></summary>
[TLDef(0x7533A588)]
public class BotMenuButtonDefault : BotMenuButtonBase { }
/// <summary><a href="https://corefork.telegram.org/api/bots/menu">Bot menu button</a> that opens the bot command list when clicked. <para>See <a href="https://corefork.telegram.org/constructor/botMenuButtonCommands"/></para></summary> /// <summary><a href="https://corefork.telegram.org/api/bots/menu">Bot menu button</a> that opens the bot command list when clicked. <para>See <a href="https://corefork.telegram.org/constructor/botMenuButtonCommands"/></para></summary>
[TLDef(0x4258C205)] [TLDef(0x4258C205)]
public class BotMenuButtonCommands : BotMenuButtonBase { } public class BotMenuButtonCommands : BotMenuButtonBase { }
@ -13263,11 +13253,9 @@ namespace TL
public DocumentBase[] ringtones; public DocumentBase[] ringtones;
} }
/// <summary>Represents a notification sound <para>Derived classes: <see cref="NotificationSoundDefault"/>, <see cref="NotificationSoundNone"/>, <see cref="NotificationSoundLocal"/>, <see cref="NotificationSoundRingtone"/></para> <para>See <a href="https://corefork.telegram.org/type/NotificationSound"/></para></summary> /// <summary>Represents a notification sound <para>Derived classes: <see cref="NotificationSoundNone"/>, <see cref="NotificationSoundLocal"/>, <see cref="NotificationSoundRingtone"/></para> <para>See <a href="https://corefork.telegram.org/type/NotificationSound"/></para></summary>
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/notificationSoundDefault">notificationSoundDefault</a></remarks>
public abstract class NotificationSound : IObject { } public abstract class NotificationSound : IObject { }
/// <summary>Indicates the default notification sound should be used <para>See <a href="https://corefork.telegram.org/constructor/notificationSoundDefault"/></para></summary>
[TLDef(0x97E8BEBE)]
public class NotificationSoundDefault : NotificationSound { }
/// <summary>No notification sound should be used <para>See <a href="https://corefork.telegram.org/constructor/notificationSoundNone"/></para></summary> /// <summary>No notification sound should be used <para>See <a href="https://corefork.telegram.org/constructor/notificationSoundNone"/></para></summary>
[TLDef(0x6F0C34DF)] [TLDef(0x6F0C34DF)]
public class NotificationSoundNone : NotificationSound { } public class NotificationSoundNone : NotificationSound { }
@ -13483,11 +13471,9 @@ namespace TL
public long document_id; public long document_id;
} }
/// <summary>Available chat reactions <para>Derived classes: <see cref="ChatReactionsNone"/>, <see cref="ChatReactionsAll"/>, <see cref="ChatReactionsSome"/></para> <para>See <a href="https://corefork.telegram.org/type/ChatReactions"/></para></summary> /// <summary>Available chat reactions <para>Derived classes: <see cref="ChatReactionsAll"/>, <see cref="ChatReactionsSome"/></para> <para>See <a href="https://corefork.telegram.org/type/ChatReactions"/></para></summary>
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/chatReactionsNone">chatReactionsNone</a></remarks>
public abstract class ChatReactions : IObject { } public abstract class ChatReactions : IObject { }
/// <summary>No reactions are allowed <para>See <a href="https://corefork.telegram.org/constructor/chatReactionsNone"/></para></summary>
[TLDef(0xEAFC32BC)]
public class ChatReactionsNone : ChatReactions { }
/// <summary>All reactions or all non-custom reactions are allowed <para>See <a href="https://corefork.telegram.org/constructor/chatReactionsAll"/></para></summary> /// <summary>All reactions or all non-custom reactions are allowed <para>See <a href="https://corefork.telegram.org/constructor/chatReactionsAll"/></para></summary>
[TLDef(0x52928BCA)] [TLDef(0x52928BCA)]
public class ChatReactionsAll : ChatReactions public class ChatReactionsAll : ChatReactions

View file

@ -2587,6 +2587,7 @@ namespace TL
/// <param name="msg_id">The message</param> /// <param name="msg_id">The message</param>
/// <param name="button_id">The ID of the button with the authorization request</param> /// <param name="button_id">The ID of the button with the authorization request</param>
/// <param name="url">URL used for <a href="https://corefork.telegram.org/api/url-authorization#link-url-authorization">link URL authorization, click here for more info »</a></param> /// <param name="url">URL used for <a href="https://corefork.telegram.org/api/url-authorization#link-url-authorization">link URL authorization, click here for more info »</a></param>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/urlAuthResultDefault">urlAuthResultDefault</a></returns>
public static Task<UrlAuthResult> Messages_RequestUrlAuth(this Client client, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null) public static Task<UrlAuthResult> Messages_RequestUrlAuth(this Client client, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null)
=> client.Invoke(new Messages_RequestUrlAuth => client.Invoke(new Messages_RequestUrlAuth
{ {
@ -2603,6 +2604,7 @@ namespace TL
/// <param name="msg_id">Message ID of the message with the login button</param> /// <param name="msg_id">Message ID of the message with the login button</param>
/// <param name="button_id">ID of the login button</param> /// <param name="button_id">ID of the login button</param>
/// <param name="url">URL used for <a href="https://corefork.telegram.org/api/url-authorization#link-url-authorization">link URL authorization, click here for more info »</a></param> /// <param name="url">URL used for <a href="https://corefork.telegram.org/api/url-authorization#link-url-authorization">link URL authorization, click here for more info »</a></param>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/urlAuthResultDefault">urlAuthResultDefault</a></returns>
public static Task<UrlAuthResult> Messages_AcceptUrlAuth(this Client client, bool write_allowed = false, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null) public static Task<UrlAuthResult> Messages_AcceptUrlAuth(this Client client, bool write_allowed = false, InputPeer peer = null, int? msg_id = null, int? button_id = null, string url = null)
=> client.Invoke(new Messages_AcceptUrlAuth => client.Invoke(new Messages_AcceptUrlAuth
{ {
@ -2691,7 +2693,7 @@ namespace TL
}); });
/// <summary>Get <a href="https://corefork.telegram.org/api/folders">folders</a> <para>See <a href="https://corefork.telegram.org/method/messages.getDialogFilters"/></para></summary> /// <summary>Get <a href="https://corefork.telegram.org/api/folders">folders</a> <para>See <a href="https://corefork.telegram.org/method/messages.getDialogFilters"/></para></summary>
public static Task<DialogFilterBase[]> Messages_GetDialogFilters(this Client client) public static Task<DialogFilter[]> Messages_GetDialogFilters(this Client client)
=> client.Invoke(new Messages_GetDialogFilters => client.Invoke(new Messages_GetDialogFilters
{ {
}); });
@ -2705,7 +2707,7 @@ namespace TL
/// <summary>Update <a href="https://corefork.telegram.org/api/folders">folder</a> <para>See <a href="https://corefork.telegram.org/method/messages.updateDialogFilter"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.updateDialogFilter#possible-errors">details</a>)</para></summary> /// <summary>Update <a href="https://corefork.telegram.org/api/folders">folder</a> <para>See <a href="https://corefork.telegram.org/method/messages.updateDialogFilter"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.updateDialogFilter#possible-errors">details</a>)</para></summary>
/// <param name="id"><a href="https://corefork.telegram.org/api/folders">Folder</a> ID</param> /// <param name="id"><a href="https://corefork.telegram.org/api/folders">Folder</a> ID</param>
/// <param name="filter"><a href="https://corefork.telegram.org/api/folders">Folder</a> info</param> /// <param name="filter"><a href="https://corefork.telegram.org/api/folders">Folder</a> info</param>
public static Task<bool> Messages_UpdateDialogFilter(this Client client, int id, DialogFilterBase filter = null) public static Task<bool> Messages_UpdateDialogFilter(this Client client, int id, DialogFilter filter = null)
=> client.Invoke(new Messages_UpdateDialogFilter => client.Invoke(new Messages_UpdateDialogFilter
{ {
flags = (Messages_UpdateDialogFilter.Flags)(filter != null ? 0x1 : 0), flags = (Messages_UpdateDialogFilter.Flags)(filter != null ? 0x1 : 0),
@ -4229,6 +4231,7 @@ namespace TL
/// <summary>Gets the menu button action for a given user or for all users, previously set using <a href="https://corefork.telegram.org/method/bots.setBotMenuButton">bots.setBotMenuButton</a>; users can see this information in the <see cref="BotInfo"/>. <para>See <a href="https://corefork.telegram.org/method/bots.getBotMenuButton"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/bots.getBotMenuButton#possible-errors">details</a>)</para></summary> /// <summary>Gets the menu button action for a given user or for all users, previously set using <a href="https://corefork.telegram.org/method/bots.setBotMenuButton">bots.setBotMenuButton</a>; users can see this information in the <see cref="BotInfo"/>. <para>See <a href="https://corefork.telegram.org/method/bots.getBotMenuButton"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/bots.getBotMenuButton#possible-errors">details</a>)</para></summary>
/// <param name="user_id">User ID or empty for the default menu button.</param> /// <param name="user_id">User ID or empty for the default menu button.</param>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/botMenuButtonDefault">botMenuButtonDefault</a></returns>
public static Task<BotMenuButtonBase> Bots_GetBotMenuButton(this Client client, InputUserBase user_id) public static Task<BotMenuButtonBase> Bots_GetBotMenuButton(this Client client, InputUserBase user_id)
=> client.Invoke(new Bots_GetBotMenuButton => client.Invoke(new Bots_GetBotMenuButton
{ {
@ -7106,7 +7109,7 @@ namespace TL.Methods
} }
[TLDef(0xF19ED96D)] [TLDef(0xF19ED96D)]
public class Messages_GetDialogFilters : IMethod<DialogFilterBase[]> { } public class Messages_GetDialogFilters : IMethod<DialogFilter[]> { }
[TLDef(0xA29CD42C)] [TLDef(0xA29CD42C)]
public class Messages_GetSuggestedDialogFilters : IMethod<DialogFilterSuggested[]> { } public class Messages_GetSuggestedDialogFilters : IMethod<DialogFilterSuggested[]> { }
@ -7116,7 +7119,7 @@ namespace TL.Methods
{ {
public Flags flags; public Flags flags;
public int id; public int id;
[IfFlag(0)] public DialogFilterBase filter; [IfFlag(0)] public DialogFilter filter;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {

View file

@ -865,7 +865,7 @@ namespace TL
[0xE844EBFF] = typeof(Messages_SearchCounter), [0xE844EBFF] = typeof(Messages_SearchCounter),
[0x92D33A0E] = typeof(UrlAuthResultRequest), [0x92D33A0E] = typeof(UrlAuthResultRequest),
[0x8F8C0E4E] = typeof(UrlAuthResultAccepted), [0x8F8C0E4E] = typeof(UrlAuthResultAccepted),
[0xA9D6DB1F] = typeof(UrlAuthResultDefault), [0xA9D6DB1F] = null,//UrlAuthResultDefault
[0xBFB5AD8B] = null,//ChannelLocationEmpty [0xBFB5AD8B] = null,//ChannelLocationEmpty
[0x209B82DB] = typeof(ChannelLocation), [0x209B82DB] = typeof(ChannelLocation),
[0xCA461B5D] = typeof(PeerLocated), [0xCA461B5D] = typeof(PeerLocated),
@ -891,7 +891,7 @@ namespace TL
[0xF568028A] = typeof(BankCardOpenUrl), [0xF568028A] = typeof(BankCardOpenUrl),
[0x3E24E573] = typeof(Payments_BankCardData), [0x3E24E573] = typeof(Payments_BankCardData),
[0x7438F7E8] = typeof(DialogFilter), [0x7438F7E8] = typeof(DialogFilter),
[0x363293AE] = typeof(DialogFilterDefault), [0x363293AE] = null,//DialogFilterDefault
[0x77744D4A] = typeof(DialogFilterSuggested), [0x77744D4A] = typeof(DialogFilterSuggested),
[0xB637EDAF] = typeof(StatsDateRangeDays), [0xB637EDAF] = typeof(StatsDateRangeDays),
[0xCB43ACDE] = typeof(StatsAbsValueAndPrev), [0xCB43ACDE] = typeof(StatsAbsValueAndPrev),
@ -942,7 +942,7 @@ namespace TL
[0xDCB118B7] = typeof(GroupCallParticipantVideoSourceGroup), [0xDCB118B7] = typeof(GroupCallParticipantVideoSourceGroup),
[0x67753AC8] = typeof(GroupCallParticipantVideo), [0x67753AC8] = typeof(GroupCallParticipantVideo),
[0x85FEA03F] = typeof(Stickers_SuggestedShortName), [0x85FEA03F] = typeof(Stickers_SuggestedShortName),
[0x2F6CB2AB] = typeof(BotCommandScopeDefault), [0x2F6CB2AB] = null,//BotCommandScopeDefault
[0x3C4F04D8] = typeof(BotCommandScopeUsers), [0x3C4F04D8] = typeof(BotCommandScopeUsers),
[0x6FE1A881] = typeof(BotCommandScopeChats), [0x6FE1A881] = typeof(BotCommandScopeChats),
[0xB9AA606A] = typeof(BotCommandScopeChatAdmins), [0xB9AA606A] = typeof(BotCommandScopeChatAdmins),
@ -983,12 +983,12 @@ namespace TL
[0x0C14557C] = typeof(WebViewResultUrl), [0x0C14557C] = typeof(WebViewResultUrl),
[0x882F76BB] = typeof(SimpleWebViewResultUrl), [0x882F76BB] = typeof(SimpleWebViewResultUrl),
[0x0C94511C] = typeof(WebViewMessageSent), [0x0C94511C] = typeof(WebViewMessageSent),
[0x7533A588] = typeof(BotMenuButtonDefault), [0x7533A588] = null,//BotMenuButtonDefault
[0x4258C205] = typeof(BotMenuButtonCommands), [0x4258C205] = typeof(BotMenuButtonCommands),
[0xC7B57CE6] = typeof(BotMenuButton), [0xC7B57CE6] = typeof(BotMenuButton),
[0xFBF6E8B1] = null,//Account_SavedRingtonesNotModified [0xFBF6E8B1] = null,//Account_SavedRingtonesNotModified
[0xC1E92CC5] = typeof(Account_SavedRingtones), [0xC1E92CC5] = typeof(Account_SavedRingtones),
[0x97E8BEBE] = typeof(NotificationSoundDefault), [0x97E8BEBE] = null,//NotificationSoundDefault
[0x6F0C34DF] = typeof(NotificationSoundNone), [0x6F0C34DF] = typeof(NotificationSoundNone),
[0x830B9AE4] = typeof(NotificationSoundLocal), [0x830B9AE4] = typeof(NotificationSoundLocal),
[0xFF6C8049] = typeof(NotificationSoundRingtone), [0xFF6C8049] = typeof(NotificationSoundRingtone),
@ -1011,7 +1011,7 @@ namespace TL
[0x79F5D419] = null,//ReactionEmpty [0x79F5D419] = null,//ReactionEmpty
[0x1B2286B8] = typeof(ReactionEmoji), [0x1B2286B8] = typeof(ReactionEmoji),
[0x8935FC73] = typeof(ReactionCustomEmoji), [0x8935FC73] = typeof(ReactionCustomEmoji),
[0xEAFC32BC] = typeof(ChatReactionsNone), [0xEAFC32BC] = null,//ChatReactionsNone
[0x52928BCA] = typeof(ChatReactionsAll), [0x52928BCA] = typeof(ChatReactionsAll),
[0x661D4037] = typeof(ChatReactionsSome), [0x661D4037] = typeof(ChatReactionsSome),
[0xB06FDBDF] = null,//Messages_ReactionsNotModified [0xB06FDBDF] = null,//Messages_ReactionsNotModified
@ -1125,15 +1125,21 @@ namespace TL
[typeof(Help_PassportConfig)] = 0xBFB9F457, //help.passportConfigNotModified [typeof(Help_PassportConfig)] = 0xBFB9F457, //help.passportConfigNotModified
[typeof(Help_UserInfo)] = 0xF3AE2EED, //help.userInfoEmpty [typeof(Help_UserInfo)] = 0xF3AE2EED, //help.userInfoEmpty
[typeof(Account_WallPapers)] = 0x1C199183, //account.wallPapersNotModified [typeof(Account_WallPapers)] = 0x1C199183, //account.wallPapersNotModified
[typeof(UrlAuthResult)] = 0xA9D6DB1F, //urlAuthResultDefault
[typeof(ChannelLocation)] = 0xBFB5AD8B, //channelLocationEmpty [typeof(ChannelLocation)] = 0xBFB5AD8B, //channelLocationEmpty
[typeof(Account_Themes)] = 0xF41EB622, //account.themesNotModified [typeof(Account_Themes)] = 0xF41EB622, //account.themesNotModified
[typeof(DialogFilter)] = 0x363293AE, //dialogFilterDefault
[typeof(Help_CountriesList)] = 0x93CC1F32, //help.countriesListNotModified [typeof(Help_CountriesList)] = 0x93CC1F32, //help.countriesListNotModified
[typeof(BotCommandScope)] = 0x2F6CB2AB, //botCommandScopeDefault
[typeof(Messages_AvailableReactions)] = 0x9F071957, //messages.availableReactionsNotModified [typeof(Messages_AvailableReactions)] = 0x9F071957, //messages.availableReactionsNotModified
[typeof(AttachMenuBots)] = 0xF1D88A5C, //attachMenuBotsNotModified [typeof(AttachMenuBots)] = 0xF1D88A5C, //attachMenuBotsNotModified
[typeof(BotMenuButtonBase)] = 0x7533A588, //botMenuButtonDefault
[typeof(Account_SavedRingtones)] = 0xFBF6E8B1, //account.savedRingtonesNotModified [typeof(Account_SavedRingtones)] = 0xFBF6E8B1, //account.savedRingtonesNotModified
[typeof(NotificationSound)] = 0x97E8BEBE, //notificationSoundDefault
[typeof(EmojiStatus)] = 0x2DE11AAE, //emojiStatusEmpty [typeof(EmojiStatus)] = 0x2DE11AAE, //emojiStatusEmpty
[typeof(Account_EmojiStatuses)] = 0xD08CE645, //account.emojiStatusesNotModified [typeof(Account_EmojiStatuses)] = 0xD08CE645, //account.emojiStatusesNotModified
[typeof(Reaction)] = 0x79F5D419, //reactionEmpty [typeof(Reaction)] = 0x79F5D419, //reactionEmpty
[typeof(ChatReactions)] = 0xEAFC32BC, //chatReactionsNone
[typeof(Messages_Reactions)] = 0xB06FDBDF, //messages.reactionsNotModified [typeof(Messages_Reactions)] = 0xB06FDBDF, //messages.reactionsNotModified
// from TL.Secret: // from TL.Secret:
[typeof(DecryptedMessageMedia)] = 0x089F5C4A, //decryptedMessageMediaEmpty [typeof(DecryptedMessageMedia)] = 0x089F5C4A, //decryptedMessageMediaEmpty