API Layer 198: stargifts stuff, video cover, ...

This commit is contained in:
Wizou 2025-01-22 23:28:58 +01:00
parent cbcb11e25e
commit fdaaeb901a
5 changed files with 397 additions and 190 deletions

View file

@ -1,4 +1,4 @@
[![API Layer](https://img.shields.io/badge/API_Layer-196-blueviolet)](https://corefork.telegram.org/methods) [![API Layer](https://img.shields.io/badge/API_Layer-198-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/)
[![NuGet prerelease](https://img.shields.io/nuget/vpre/WTelegramClient?color=C09030&label=dev+nuget)](https://www.nuget.org/packages/WTelegramClient/absoluteLatest) [![NuGet prerelease](https://img.shields.io/nuget/vpre/WTelegramClient?color=C09030&label=dev+nuget)](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
[![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://buymeacoffee.com/wizou) [![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://buymeacoffee.com/wizou)

View file

@ -229,7 +229,7 @@ namespace TL
public string vcard; public string vcard;
} }
/// <summary>New document <para>See <a href="https://corefork.telegram.org/constructor/inputMediaUploadedDocument"/></para></summary> /// <summary>New document <para>See <a href="https://corefork.telegram.org/constructor/inputMediaUploadedDocument"/></para></summary>
[TLDef(0x5B38C6C1)] [TLDef(0x037C9330)]
public sealed partial class InputMediaUploadedDocument : InputMedia public sealed partial class InputMediaUploadedDocument : InputMedia
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
@ -244,6 +244,8 @@ namespace TL
public DocumentAttribute[] attributes; public DocumentAttribute[] attributes;
/// <summary>Attached stickers</summary> /// <summary>Attached stickers</summary>
[IfFlag(0)] public InputDocument[] stickers; [IfFlag(0)] public InputDocument[] stickers;
[IfFlag(6)] public InputPhoto video_cover;
[IfFlag(7)] public int video_timestamp;
/// <summary>Time to live in seconds of self-destructing document</summary> /// <summary>Time to live in seconds of self-destructing document</summary>
[IfFlag(1)] public int ttl_seconds; [IfFlag(1)] public int ttl_seconds;
@ -261,16 +263,22 @@ namespace TL
force_file = 0x10, force_file = 0x10,
/// <summary>Whether this media should be hidden behind a spoiler warning</summary> /// <summary>Whether this media should be hidden behind a spoiler warning</summary>
spoiler = 0x20, spoiler = 0x20,
/// <summary>Field <see cref="video_cover"/> has a value</summary>
has_video_cover = 0x40,
/// <summary>Field <see cref="video_timestamp"/> has a value</summary>
has_video_timestamp = 0x80,
} }
} }
/// <summary>Forwarded document <para>See <a href="https://corefork.telegram.org/constructor/inputMediaDocument"/></para></summary> /// <summary>Forwarded document <para>See <a href="https://corefork.telegram.org/constructor/inputMediaDocument"/></para></summary>
[TLDef(0x33473058)] [TLDef(0xA8763AB5)]
public sealed partial class InputMediaDocument : InputMedia public sealed partial class InputMediaDocument : InputMedia
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags; public Flags flags;
/// <summary>The document to be forwarded.</summary> /// <summary>The document to be forwarded.</summary>
public InputDocument id; public InputDocument id;
[IfFlag(3)] public InputPhoto video_cover;
[IfFlag(4)] public int video_timestamp;
/// <summary>Time to live of self-destructing document</summary> /// <summary>Time to live of self-destructing document</summary>
[IfFlag(0)] public int ttl_seconds; [IfFlag(0)] public int ttl_seconds;
/// <summary>Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance.</summary> /// <summary>Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance.</summary>
@ -284,6 +292,10 @@ namespace TL
has_query = 0x2, has_query = 0x2,
/// <summary>Whether this media should be hidden behind a spoiler warning</summary> /// <summary>Whether this media should be hidden behind a spoiler warning</summary>
spoiler = 0x4, spoiler = 0x4,
/// <summary>Field <see cref="video_cover"/> has a value</summary>
has_video_cover = 0x8,
/// <summary>Field <see cref="video_timestamp"/> has a value</summary>
has_video_timestamp = 0x10,
} }
} }
/// <summary>Can be used to send a venue geolocation. <para>See <a href="https://corefork.telegram.org/constructor/inputMediaVenue"/></para></summary> /// <summary>Can be used to send a venue geolocation. <para>See <a href="https://corefork.telegram.org/constructor/inputMediaVenue"/></para></summary>
@ -323,7 +335,7 @@ namespace TL
} }
} }
/// <summary>Document that will be downloaded by the telegram servers <para>See <a href="https://corefork.telegram.org/constructor/inputMediaDocumentExternal"/></para></summary> /// <summary>Document that will be downloaded by the telegram servers <para>See <a href="https://corefork.telegram.org/constructor/inputMediaDocumentExternal"/></para></summary>
[TLDef(0xFB52DC99)] [TLDef(0x779600F9)]
public sealed partial class InputMediaDocumentExternal : InputMedia public sealed partial class InputMediaDocumentExternal : InputMedia
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
@ -332,6 +344,8 @@ namespace TL
public string url; public string url;
/// <summary>Self-destruct time to live of document</summary> /// <summary>Self-destruct time to live of document</summary>
[IfFlag(0)] public int ttl_seconds; [IfFlag(0)] public int ttl_seconds;
[IfFlag(2)] public InputPhoto video_cover;
[IfFlag(3)] public int video_timestamp;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -339,6 +353,10 @@ namespace TL
has_ttl_seconds = 0x1, has_ttl_seconds = 0x1,
/// <summary>Whether this media should be hidden behind a spoiler warning</summary> /// <summary>Whether this media should be hidden behind a spoiler warning</summary>
spoiler = 0x2, spoiler = 0x2,
/// <summary>Field <see cref="video_cover"/> has a value</summary>
has_video_cover = 0x4,
/// <summary>Field <see cref="video_timestamp"/> has a value</summary>
has_video_timestamp = 0x8,
} }
} }
/// <summary>A game <para>See <a href="https://corefork.telegram.org/constructor/inputMediaGame"/></para></summary> /// <summary>A game <para>See <a href="https://corefork.telegram.org/constructor/inputMediaGame"/></para></summary>
@ -782,7 +800,7 @@ namespace TL
/// <summary>Language code of the user</summary> /// <summary>Language code of the user</summary>
[IfFlag(22)] public string lang_code; [IfFlag(22)] public string lang_code;
/// <summary><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a></summary> /// <summary><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a></summary>
[IfFlag(30)] public EmojiStatus emoji_status; [IfFlag(30)] public EmojiStatusBase emoji_status;
/// <summary>Additional usernames. <br/>When updating the <a href="https://corefork.telegram.org/api/peers">local peer database</a>, apply changes to this field only if: <br/>- The <c>min</c> flag is not set OR <br/>- The <c>min</c> flag is set AND <br/>-- The <c>min</c> flag of the locally cached user entry is set. <br/>Changes to this flag (if the above conditions are respected) should invalidate the local <see cref="UserFull"/> cache for this user ID.</summary> /// <summary>Additional usernames. <br/>When updating the <a href="https://corefork.telegram.org/api/peers">local peer database</a>, apply changes to this field only if: <br/>- The <c>min</c> flag is not set OR <br/>- The <c>min</c> flag is set AND <br/>-- The <c>min</c> flag of the locally cached user entry is set. <br/>Changes to this flag (if the above conditions are respected) should invalidate the local <see cref="UserFull"/> cache for this user ID.</summary>
[IfFlag(32)] public Username[] usernames; [IfFlag(32)] public Username[] usernames;
/// <summary>ID of the maximum read <a href="https://corefork.telegram.org/api/stories">story</a>. <br/>When updating the <a href="https://corefork.telegram.org/api/peers">local peer database</a>, do not apply changes to this field if the <c>min</c> flag of the incoming constructor is set.</summary> /// <summary>ID of the maximum read <a href="https://corefork.telegram.org/api/stories">story</a>. <br/>When updating the <a href="https://corefork.telegram.org/api/peers">local peer database</a>, do not apply changes to this field if the <c>min</c> flag of the incoming constructor is set.</summary>
@ -1091,7 +1109,7 @@ namespace TL
/// <summary>The channel's <a href="https://corefork.telegram.org/api/colors">profile color</a>.</summary> /// <summary>The channel's <a href="https://corefork.telegram.org/api/colors">profile color</a>.</summary>
[IfFlag(40)] public PeerColor profile_color; [IfFlag(40)] public PeerColor profile_color;
/// <summary><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a></summary> /// <summary><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a></summary>
[IfFlag(41)] public EmojiStatus emoji_status; [IfFlag(41)] public EmojiStatusBase emoji_status;
/// <summary><a href="https://corefork.telegram.org/api/boost">Boost level</a>. <br/>Changes to this flag should invalidate the local <see cref="ChannelFull"/> cache for this channel/supergroup ID, see <a href="https://corefork.telegram.org/api/peers#full-info-database">here »</a> for more info.</summary> /// <summary><a href="https://corefork.telegram.org/api/boost">Boost level</a>. <br/>Changes to this flag should invalidate the local <see cref="ChannelFull"/> cache for this channel/supergroup ID, see <a href="https://corefork.telegram.org/api/peers#full-info-database">here »</a> for more info.</summary>
[IfFlag(42)] public int level; [IfFlag(42)] public int level;
/// <summary>Expiration date of the <a href="https://corefork.telegram.org/api/stars#star-subscriptions">Telegram Star subscription »</a> the current user has bought to gain access to this channel.</summary> /// <summary>Expiration date of the <a href="https://corefork.telegram.org/api/stars#star-subscriptions">Telegram Star subscription »</a> the current user has bought to gain access to this channel.</summary>
@ -1363,7 +1381,7 @@ namespace TL
public override int ReactionsLimit => reactions_limit; public override int ReactionsLimit => reactions_limit;
} }
/// <summary>Full info about a <a href="https://corefork.telegram.org/api/channel#channels">channel</a>, <a href="https://corefork.telegram.org/api/channel#supergroups">supergroup</a> or <a href="https://corefork.telegram.org/api/channel#gigagroups">gigagroup</a>. <para>See <a href="https://corefork.telegram.org/constructor/channelFull"/></para></summary> /// <summary>Full info about a <a href="https://corefork.telegram.org/api/channel#channels">channel</a>, <a href="https://corefork.telegram.org/api/channel#supergroups">supergroup</a> or <a href="https://corefork.telegram.org/api/channel#gigagroups">gigagroup</a>. <para>See <a href="https://corefork.telegram.org/constructor/channelFull"/></para></summary>
[TLDef(0x9FF3B858)] [TLDef(0x52D6806B)]
public sealed partial class ChannelFull : ChatFullBase public sealed partial class ChannelFull : ChatFullBase
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
@ -1453,6 +1471,7 @@ namespace TL
/// <summary><a href="https://corefork.telegram.org/api/custom-emoji">Custom emoji stickerset</a> associated to the current <em>supergroup</em>, set using <see cref="SchemaExtensions.Channels_SetEmojiStickers">Channels_SetEmojiStickers</see> after reaching the appropriate boost level, see <a href="https://corefork.telegram.org/api/boost#setting-a-custom-emoji-stickerset-for-supergroups">here »</a> for more info.</summary> /// <summary><a href="https://corefork.telegram.org/api/custom-emoji">Custom emoji stickerset</a> associated to the current <em>supergroup</em>, set using <see cref="SchemaExtensions.Channels_SetEmojiStickers">Channels_SetEmojiStickers</see> after reaching the appropriate boost level, see <a href="https://corefork.telegram.org/api/boost#setting-a-custom-emoji-stickerset-for-supergroups">here »</a> for more info.</summary>
[IfFlag(42)] public StickerSet emojiset; [IfFlag(42)] public StickerSet emojiset;
[IfFlag(49)] public BotVerification bot_verification; [IfFlag(49)] public BotVerification bot_verification;
[IfFlag(50)] public int stargifts_count;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -1558,6 +1577,9 @@ namespace TL
paid_reactions_available = 0x10000, paid_reactions_available = 0x10000,
/// <summary>Field <see cref="bot_verification"/> has a value</summary> /// <summary>Field <see cref="bot_verification"/> has a value</summary>
has_bot_verification = 0x20000, has_bot_verification = 0x20000,
/// <summary>Field <see cref="stargifts_count"/> has a value</summary>
has_stargifts_count = 0x40000,
stargifts_available = 0x80000,
} }
/// <summary>ID of the channel</summary> /// <summary>ID of the channel</summary>
@ -2001,7 +2023,7 @@ namespace TL
[TLDef(0x9F84F49E)] [TLDef(0x9F84F49E)]
public sealed partial class MessageMediaUnsupported : MessageMedia { } public sealed partial class MessageMediaUnsupported : MessageMedia { }
/// <summary>Document (video, audio, voice, sticker, any media type except photo) <para>See <a href="https://corefork.telegram.org/constructor/messageMediaDocument"/></para></summary> /// <summary>Document (video, audio, voice, sticker, any media type except photo) <para>See <a href="https://corefork.telegram.org/constructor/messageMediaDocument"/></para></summary>
[TLDef(0xDD570BD5)] [TLDef(0x52D8CCD9)]
public sealed partial class MessageMediaDocument : MessageMedia public sealed partial class MessageMediaDocument : MessageMedia
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
@ -2010,6 +2032,8 @@ namespace TL
[IfFlag(0)] public DocumentBase document; [IfFlag(0)] public DocumentBase document;
/// <summary>Videos only, contains alternative qualities of the video.</summary> /// <summary>Videos only, contains alternative qualities of the video.</summary>
[IfFlag(5)] public DocumentBase[] alt_documents; [IfFlag(5)] public DocumentBase[] alt_documents;
[IfFlag(9)] public PhotoBase video_cover;
[IfFlag(10)] public int video_timestamp;
/// <summary>Time to live of self-destructing document</summary> /// <summary>Time to live of self-destructing document</summary>
[IfFlag(2)] public int ttl_seconds; [IfFlag(2)] public int ttl_seconds;
@ -2031,6 +2055,10 @@ namespace TL
round = 0x80, round = 0x80,
/// <summary>Whether this is a voice message.</summary> /// <summary>Whether this is a voice message.</summary>
voice = 0x100, voice = 0x100,
/// <summary>Field <see cref="video_cover"/> has a value</summary>
has_video_cover = 0x200,
/// <summary>Field <see cref="video_timestamp"/> has a value</summary>
has_video_timestamp = 0x400,
} }
} }
/// <summary>Preview of webpage <para>See <a href="https://corefork.telegram.org/constructor/messageMediaWebPage"/></para></summary> /// <summary>Preview of webpage <para>See <a href="https://corefork.telegram.org/constructor/messageMediaWebPage"/></para></summary>
@ -2842,7 +2870,7 @@ namespace TL
} }
} }
/// <summary>You received a <a href="https://corefork.telegram.org/api/gifts">gift, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGift"/></para></summary> /// <summary>You received a <a href="https://corefork.telegram.org/api/gifts">gift, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGift"/></para></summary>
[TLDef(0xD8F4F0A7)] [TLDef(0x4717E8A4)]
public sealed partial class MessageActionStarGift : MessageAction public sealed partial class MessageActionStarGift : MessageAction
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
@ -2855,6 +2883,9 @@ namespace TL
[IfFlag(4)] public long convert_stars; [IfFlag(4)] public long convert_stars;
[IfFlag(5)] public int upgrade_msg_id; [IfFlag(5)] public int upgrade_msg_id;
[IfFlag(8)] public long upgrade_stars; [IfFlag(8)] public long upgrade_stars;
[IfFlag(11)] public Peer from_id;
[IfFlag(12)] public Peer peer;
[IfFlag(12)] public long saved_id;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -2873,16 +2904,23 @@ namespace TL
has_upgrade_stars = 0x100, has_upgrade_stars = 0x100,
refunded = 0x200, refunded = 0x200,
can_upgrade = 0x400, can_upgrade = 0x400,
/// <summary>Field <see cref="from_id"/> has a value</summary>
has_from_id = 0x800,
/// <summary>Fields <see cref="peer"/> and <see cref="saved_id"/> have a value</summary>
has_peer = 0x1000,
} }
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGiftUnique"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGiftUnique"/></para></summary>
[TLDef(0x26077B99)] [TLDef(0xACDFCB81)]
public sealed partial class MessageActionStarGiftUnique : MessageAction public sealed partial class MessageActionStarGiftUnique : MessageAction
{ {
public Flags flags; public Flags flags;
public StarGiftBase gift; public StarGiftBase gift;
[IfFlag(3)] public int can_export_at; [IfFlag(3)] public int can_export_at;
[IfFlag(4)] public long transfer_stars; [IfFlag(4)] public long transfer_stars;
[IfFlag(6)] public Peer from_id;
[IfFlag(7)] public Peer peer;
[IfFlag(7)] public long saved_id;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -2892,6 +2930,8 @@ namespace TL
has_can_export_at = 0x8, has_can_export_at = 0x8,
has_transfer_stars = 0x10, has_transfer_stars = 0x10,
refunded = 0x20, refunded = 0x20,
has_from_id = 0x40,
has_peer = 0x80,
} }
} }
@ -5288,7 +5328,7 @@ namespace TL
public sealed partial class UpdateUserEmojiStatus : UpdateUser public sealed partial class UpdateUserEmojiStatus : UpdateUser
{ {
/// <summary>New <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a></summary> /// <summary>New <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a></summary>
public EmojiStatus emoji_status; public EmojiStatusBase emoji_status;
} }
/// <summary>The list of recent <a href="https://corefork.telegram.org/api/emoji-status">emoji statuses</a> has changed <para>See <a href="https://corefork.telegram.org/constructor/updateRecentEmojiStatuses"/></para></summary> /// <summary>The list of recent <a href="https://corefork.telegram.org/api/emoji-status">emoji statuses</a> has changed <para>See <a href="https://corefork.telegram.org/constructor/updateRecentEmojiStatuses"/></para></summary>
[TLDef(0x30F443DB)] [TLDef(0x30F443DB)]
@ -12010,9 +12050,9 @@ namespace TL
public sealed partial class ChannelAdminLogEventActionChangeEmojiStatus : ChannelAdminLogEventAction public sealed partial class ChannelAdminLogEventActionChangeEmojiStatus : ChannelAdminLogEventAction
{ {
/// <summary>Previous emoji status</summary> /// <summary>Previous emoji status</summary>
public EmojiStatus prev_value; public EmojiStatusBase prev_value;
/// <summary>New emoji status</summary> /// <summary>New emoji status</summary>
public EmojiStatus new_value; public EmojiStatusBase new_value;
} }
/// <summary>The supergroup's <a href="https://corefork.telegram.org/api/boost#setting-a-custom-emoji-stickerset-for-supergroups">custom emoji stickerset</a> was changed. <para>See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionChangeEmojiStickerSet"/></para></summary> /// <summary>The supergroup's <a href="https://corefork.telegram.org/api/boost#setting-a-custom-emoji-stickerset-for-supergroups">custom emoji stickerset</a> was changed. <para>See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionChangeEmojiStickerSet"/></para></summary>
[TLDef(0x46D840AB)] [TLDef(0x46D840AB)]
@ -13952,6 +13992,12 @@ namespace TL
text_color = 0x2, text_color = 0x2,
} }
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/webPageAttributeUniqueStarGift"/></para></summary>
[TLDef(0xCF6F6DB8)]
public sealed partial class WebPageAttributeUniqueStarGift : WebPageAttribute
{
public StarGiftBase gift;
}
/// <summary>How users voted in a poll <para>See <a href="https://corefork.telegram.org/constructor/messages.votesList"/></para></summary> /// <summary>How users voted in a poll <para>See <a href="https://corefork.telegram.org/constructor/messages.votesList"/></para></summary>
[TLDef(0x4899484E)] [TLDef(0x4899484E)]
@ -14423,7 +14469,7 @@ namespace TL
keep_archived_folders = 0x4, keep_archived_folders = 0x4,
/// <summary>If this flag is set, the <see cref="InputPrivacyKey.StatusTimestamp"/> key will also apply to the ability to use <see cref="SchemaExtensions.Messages_GetOutboxReadDate">Messages_GetOutboxReadDate</see> on messages sent to us. <br/>Meaning, users that cannot see <em>our</em> exact last online date due to the current value of the <see cref="InputPrivacyKey.StatusTimestamp"/> key will receive a <c>403 USER_PRIVACY_RESTRICTED</c> error when invoking <see cref="SchemaExtensions.Messages_GetOutboxReadDate">Messages_GetOutboxReadDate</see> to fetch the exact read date of a message they sent to us. <br/>The <see cref="UserFull"/>.<c>read_dates_private</c> flag will be set for users that have this flag enabled.</summary> /// <summary>If this flag is set, the <see cref="InputPrivacyKey.StatusTimestamp"/> key will also apply to the ability to use <see cref="SchemaExtensions.Messages_GetOutboxReadDate">Messages_GetOutboxReadDate</see> on messages sent to us. <br/>Meaning, users that cannot see <em>our</em> exact last online date due to the current value of the <see cref="InputPrivacyKey.StatusTimestamp"/> key will receive a <c>403 USER_PRIVACY_RESTRICTED</c> error when invoking <see cref="SchemaExtensions.Messages_GetOutboxReadDate">Messages_GetOutboxReadDate</see> to fetch the exact read date of a message they sent to us. <br/>The <see cref="UserFull"/>.<c>read_dates_private</c> flag will be set for users that have this flag enabled.</summary>
hide_read_marks = 0x8, hide_read_marks = 0x8,
/// <summary>If set, only users that have a premium account, are in our contact list, or already have a private chat with us can write to us; a <c>403 PRIVACY_PREMIUM_REQUIRED</c> error will be emitted otherwise. <br/>The <see cref="UserFull"/>.<c>contact_require_premium</c> flag will be set for users that have this flag enabled. <br/>To check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the <see cref="UserFull"/> or history of all users while displaying the chat list in the sharing UI) the <see cref="SchemaExtensions.Users_GetIsPremiumRequiredToContact">Users_GetIsPremiumRequiredToContact</see> method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user. <br/><a href="https://corefork.telegram.org/api/premium">Premium</a> users only, non-Premium users will receive a <c>PREMIUM_ACCOUNT_REQUIRED</c> error when trying to enable this flag.</summary> /// <summary>If set, only users that have a premium account, are in our contact list, or already have a private chat with us can write to us; a <c>403 PRIVACY_PREMIUM_REQUIRED</c> error will be emitted otherwise. <br/>The <see cref="UserFull"/>.<c>contact_require_premium</c> flag will be set for users that have this flag enabled. <br/>To check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the <see cref="UserFull"/> or history of all users while displaying the chat list in the sharing UI) the <see cref="SchemaExtensions.Users_GetIsPremiumRequiredToContact">Users_GetIsPremiumRequiredToContact</see> method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user. <br/>This option may be enabled by both non-<a href="https://corefork.telegram.org/api/premium">Premium</a> and <a href="https://corefork.telegram.org/api/premium">Premium</a> users only if the <a href="https://corefork.telegram.org/api/config#new-noncontact-peers-require-premium-without-ownpremium">new_noncontact_peers_require_premium_without_ownpremium client configuration flag »</a> is equal to true, otherwise it may be enabled only by <a href="https://corefork.telegram.org/api/premium">Premium</a> users and non-Premium users will receive a <c>PREMIUM_ACCOUNT_REQUIRED</c> error when trying to enable this flag.</summary>
new_noncontact_peers_require_premium = 0x10, new_noncontact_peers_require_premium = 0x10,
} }
} }
@ -15779,13 +15825,12 @@ namespace TL
public string hash; public string hash;
} }
/// <summary>Used to buy a <a href="https://corefork.telegram.org/api/gifts">Telegram Star Gift, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/inputInvoiceStarGift"/></para></summary> /// <summary>Used to buy a <a href="https://corefork.telegram.org/api/gifts">Telegram Star Gift, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/inputInvoiceStarGift"/></para></summary>
[TLDef(0x25D8C1D8)] [TLDef(0xE8625E92)]
public sealed partial class InputInvoiceStarGift : InputInvoice public sealed partial class InputInvoiceStarGift : InputInvoice
{ {
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary> /// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags; public Flags flags;
/// <summary>Identifier of the user that will receive the gift</summary> public InputPeer peer;
public InputUserBase user_id;
/// <summary>Identifier of the gift, from <see cref="StarGift"/>.<c>id</c></summary> /// <summary>Identifier of the gift, from <see cref="StarGift"/>.<c>id</c></summary>
public long gift_id; public long gift_id;
/// <summary>Optional message, attached with the gift. <br/>The maximum length for this field is specified in the <a href="https://corefork.telegram.org/api/config#stargifts-message-length-max">stargifts_message_length_max client configuration value »</a>.</summary> /// <summary>Optional message, attached with the gift. <br/>The maximum length for this field is specified in the <a href="https://corefork.telegram.org/api/config#stargifts-message-length-max">stargifts_message_length_max client configuration value »</a>.</summary>
@ -15801,11 +15846,11 @@ namespace TL
} }
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputInvoiceStarGiftUpgrade"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputInvoiceStarGiftUpgrade"/></para></summary>
[TLDef(0x5EBE7262)] [TLDef(0x4D818D5D)]
public sealed partial class InputInvoiceStarGiftUpgrade : InputInvoice public sealed partial class InputInvoiceStarGiftUpgrade : InputInvoice
{ {
public Flags flags; public Flags flags;
public int msg_id; public InputSavedStarGift stargift;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -15813,11 +15858,11 @@ namespace TL
} }
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputInvoiceStarGiftTransfer"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputInvoiceStarGiftTransfer"/></para></summary>
[TLDef(0xAE3BA9ED)] [TLDef(0x4A5F5BD9)]
public sealed partial class InputInvoiceStarGiftTransfer : InputInvoice public sealed partial class InputInvoiceStarGiftTransfer : InputInvoice
{ {
public int msg_id; public InputSavedStarGift stargift;
public InputUserBase to_id; public InputPeer to_id;
} }
/// <summary>Exported <a href="https://corefork.telegram.org/api/links#invoice-links">invoice deep link</a> <para>See <a href="https://corefork.telegram.org/constructor/payments.exportedInvoice"/></para></summary> /// <summary>Exported <a href="https://corefork.telegram.org/api/links#invoice-links">invoice deep link</a> <para>See <a href="https://corefork.telegram.org/constructor/payments.exportedInvoice"/></para></summary>
@ -16060,20 +16105,66 @@ namespace TL
public string title; public string title;
} }
/// <summary>An <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a> <para>See <a href="https://corefork.telegram.org/constructor/emojiStatus"/></para></summary> /// <summary><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a> <para>See <a href="https://corefork.telegram.org/type/EmojiStatus"/></para> <para>Derived classes: <see cref="EmojiStatus"/>, <see cref="EmojiStatusUntil"/></para></summary>
/// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/emojiStatusEmpty">emojiStatusEmpty</a></remarks> /// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/emojiStatusEmpty">emojiStatusEmpty</a></remarks>
[TLDef(0x929B619D)] public abstract partial class EmojiStatusBase : IObject
public partial class EmojiStatus : IObject
{ {
public virtual DateTime Until => default;
}
/// <summary>An <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a> <para>See <a href="https://corefork.telegram.org/constructor/emojiStatus"/></para></summary>
[TLDef(0xE7FF068A)]
public sealed partial class EmojiStatus : EmojiStatusBase
{
public Flags flags;
/// <summary><a href="https://corefork.telegram.org/api/custom-emoji">Custom emoji document ID</a></summary> /// <summary><a href="https://corefork.telegram.org/api/custom-emoji">Custom emoji document ID</a></summary>
public long document_id; public long document_id;
} [IfFlag(0)] public DateTime until;
/// <summary>An <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a> valid until the specified date <para>See <a href="https://corefork.telegram.org/constructor/emojiStatusUntil"/></para></summary>
[TLDef(0xFA30A8C7, inheritBefore = true)] [Flags] public enum Flags : uint
public sealed partial class EmojiStatusUntil : EmojiStatus
{ {
/// <summary>This status is valid until this date</summary> /// <summary>Field <see cref="until"/> has a value</summary>
public DateTime until; has_until = 0x1,
}
public override DateTime Until => until;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/emojiStatusCollectible"/></para></summary>
[TLDef(0x7184603B)]
public sealed partial class EmojiStatusCollectible : EmojiStatusBase
{
public Flags flags;
public long collectible_id;
public long document_id;
public string title;
public string slug;
public long pattern_document_id;
public int center_color;
public int edge_color;
public int pattern_color;
public int text_color;
[IfFlag(0)] public DateTime until;
[Flags] public enum Flags : uint
{
has_until = 0x1,
}
public override DateTime Until => until;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputEmojiStatusCollectible"/></para></summary>
[TLDef(0x07141DBF)]
public sealed partial class InputEmojiStatusCollectible : EmojiStatusBase
{
public Flags flags;
public long collectible_id;
[IfFlag(0)] public DateTime until;
[Flags] public enum Flags : uint
{
has_until = 0x1,
}
public override DateTime Until => until;
} }
/// <summary>A list of <a href="https://corefork.telegram.org/api/emoji-status">emoji statuses</a> <para>See <a href="https://corefork.telegram.org/constructor/account.emojiStatuses"/></para></summary> /// <summary>A list of <a href="https://corefork.telegram.org/api/emoji-status">emoji statuses</a> <para>See <a href="https://corefork.telegram.org/constructor/account.emojiStatuses"/></para></summary>
@ -16084,7 +16175,7 @@ namespace TL
/// <summary><a href="https://corefork.telegram.org/api/offsets#hash-generation">Hash used for caching, for more info click here</a></summary> /// <summary><a href="https://corefork.telegram.org/api/offsets#hash-generation">Hash used for caching, for more info click here</a></summary>
public long hash; public long hash;
/// <summary><a href="https://corefork.telegram.org/api/emoji-status">Emoji statuses</a></summary> /// <summary><a href="https://corefork.telegram.org/api/emoji-status">Emoji statuses</a></summary>
public EmojiStatus[] statuses; public EmojiStatusBase[] statuses;
} }
/// <summary><a href="https://corefork.telegram.org/api/reactions">Message reaction</a> <para>See <a href="https://corefork.telegram.org/type/Reaction"/></para> <para>Derived classes: <see cref="ReactionEmoji"/>, <see cref="ReactionCustomEmoji"/>, <see cref="ReactionPaid"/></para></summary> /// <summary><a href="https://corefork.telegram.org/api/reactions">Message reaction</a> <para>See <a href="https://corefork.telegram.org/type/Reaction"/></para> <para>Derived classes: <see cref="ReactionEmoji"/>, <see cref="ReactionCustomEmoji"/>, <see cref="ReactionPaid"/></para></summary>
@ -17473,6 +17564,13 @@ namespace TL
/// <summary>ARGB background color.</summary> /// <summary>ARGB background color.</summary>
public int color; public int color;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/mediaAreaStarGift"/></para></summary>
[TLDef(0x5787686D)]
public sealed partial class MediaAreaStarGift : MediaArea
{
public MediaAreaCoordinates coordinates;
public string slug;
}
/// <summary><a href="https://corefork.telegram.org/api/stories">Stories</a> associated to a peer <para>See <a href="https://corefork.telegram.org/constructor/peerStories"/></para></summary> /// <summary><a href="https://corefork.telegram.org/api/stories">Stories</a> associated to a peer <para>See <a href="https://corefork.telegram.org/constructor/peerStories"/></para></summary>
[TLDef(0x9A35E999)] [TLDef(0x9A35E999)]
@ -19744,17 +19842,28 @@ namespace TL
public override int AvailabilityTotal => availability_total; public override int AvailabilityTotal => availability_total;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftUnique"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftUnique"/></para></summary>
[TLDef(0x6A1407CD)] [TLDef(0xF2FE7E4A)]
public sealed partial class StarGiftUnique : StarGiftBase public sealed partial class StarGiftUnique : StarGiftBase
{ {
public Flags flags;
public long id; public long id;
public string title; public string title;
public string slug;
public int num; public int num;
public long owner_id; [IfFlag(0)] public Peer owner_id;
[IfFlag(1)] public string owner_name;
[IfFlag(2)] public string owner_address;
public StarGiftAttribute[] attributes; public StarGiftAttribute[] attributes;
public int availability_issued; public int availability_issued;
public int availability_total; public int availability_total;
[Flags] public enum Flags : uint
{
has_owner_id = 0x1,
has_owner_name = 0x2,
has_owner_address = 0x4,
}
public override long ID => id; public override long ID => id;
public override int AvailabilityTotal => availability_total; public override int AvailabilityTotal => availability_total;
} }
@ -19770,75 +19879,6 @@ namespace TL
public StarGiftBase[] gifts; public StarGiftBase[] gifts;
} }
/// <summary>Represents a <a href="https://corefork.telegram.org/api/gifts">gift</a>, displayed on a user's profile page. <para>See <a href="https://corefork.telegram.org/constructor/userStarGift"/></para></summary>
[TLDef(0x325835E1)]
public sealed partial class UserStarGift : IObject
{
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags;
/// <summary>Sender of the gift (may be empty for anonymous senders; will always be set if this gift was sent to us).</summary>
[IfFlag(1)] public long from_id;
/// <summary>When was this gift sent.</summary>
public DateTime date;
/// <summary>The gift.</summary>
public StarGiftBase gift;
/// <summary>Message attached to the gift by the sender.</summary>
[IfFlag(2)] public TextWithEntities message;
/// <summary>Only visible to the receiver of the gift, contains the ID of the <see cref="MessageService"/> with the <see cref="MessageActionStarGift"/> in the chat with <c>from_id</c>.</summary>
[IfFlag(3)] public int msg_id;
/// <summary>The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.<br/><c>convert_stars</c> will be equal to the buying price of the gift only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than <c>stars</c>.</summary>
[IfFlag(4)] public long convert_stars;
[IfFlag(6)] public long upgrade_stars;
[IfFlag(7)] public int can_export_at;
[IfFlag(8)] public long transfer_stars;
[Flags] public enum Flags : uint
{
/// <summary>If set, <c>from_id</c> will not be visible to users (it will still be visible to the receiver of the gift).</summary>
name_hidden = 0x1,
/// <summary>Field <see cref="from_id"/> has a value</summary>
has_from_id = 0x2,
/// <summary>Field <see cref="message"/> has a value</summary>
has_message = 0x4,
/// <summary>Field <see cref="msg_id"/> has a value</summary>
has_msg_id = 0x8,
/// <summary>Field <see cref="convert_stars"/> has a value</summary>
has_convert_stars = 0x10,
/// <summary>If set, indicates this is a gift sent by <c>from_id</c>, received by the current user and currently hidden from our profile page.</summary>
unsaved = 0x20,
/// <summary>Field <see cref="upgrade_stars"/> has a value</summary>
has_upgrade_stars = 0x40,
/// <summary>Field <see cref="can_export_at"/> has a value</summary>
has_can_export_at = 0x80,
/// <summary>Field <see cref="transfer_stars"/> has a value</summary>
has_transfer_stars = 0x100,
refunded = 0x200,
can_upgrade = 0x400,
}
}
/// <summary><a href="https://corefork.telegram.org/api/gifts">Gifts</a> displayed on a user's profile. <para>See <a href="https://corefork.telegram.org/constructor/payments.userStarGifts"/></para></summary>
[TLDef(0x6B65B517)]
public sealed partial class Payments_UserStarGifts : IObject
{
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags;
/// <summary>Total number of gifts displayed on the profile.</summary>
public int count;
/// <summary>The gifts.</summary>
public UserStarGift[] gifts;
/// <summary>Offset for <a href="https://corefork.telegram.org/api/offsets">pagination</a>.</summary>
[IfFlag(0)] public string next_offset;
/// <summary>Users mentioned in the <c>gifts</c> vector.</summary>
public Dictionary<long, User> users;
[Flags] public enum Flags : uint
{
/// <summary>Field <see cref="next_offset"/> has a value</summary>
has_next_offset = 0x1,
}
}
/// <summary>Report menu option <para>See <a href="https://corefork.telegram.org/constructor/messageReportOption"/></para></summary> /// <summary>Report menu option <para>See <a href="https://corefork.telegram.org/constructor/messageReportOption"/></para></summary>
[TLDef(0x7903E3D9)] [TLDef(0x7903E3D9)]
public sealed partial class MessageReportOption : IObject public sealed partial class MessageReportOption : IObject
@ -19951,7 +19991,7 @@ namespace TL
[IfFlag(0)] public int duration_months; [IfFlag(0)] public int duration_months;
/// <summary>Point in time (Unix timestamp) when the affiliate program will be closed (optional, if not set the affiliate program isn't scheduled to be closed)</summary> /// <summary>Point in time (Unix timestamp) when the affiliate program will be closed (optional, if not set the affiliate program isn't scheduled to be closed)</summary>
[IfFlag(1)] public DateTime end_date; [IfFlag(1)] public DateTime end_date;
/// <summary>The amount of daily revenue per user in Telegram Stars of the bot that created the affiliate program</summary> /// <summary>The amount of daily revenue per user in Telegram Stars of the bot that created the affiliate program. <br/>To obtain the approximated revenue per referred user, multiply this value by <c>commission_permille</c> and divide by <c>1000</c>.</summary>
[IfFlag(2)] public StarsAmount daily_revenue_per_user; [IfFlag(2)] public StarsAmount daily_revenue_per_user;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
@ -20131,12 +20171,12 @@ namespace TL
public int rarity_permille; public int rarity_permille;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAttributeOriginalDetails"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftAttributeOriginalDetails"/></para></summary>
[TLDef(0xC02C4F4B)] [TLDef(0xE0BFF26C)]
public sealed partial class StarGiftAttributeOriginalDetails : StarGiftAttribute public sealed partial class StarGiftAttributeOriginalDetails : StarGiftAttribute
{ {
public Flags flags; public Flags flags;
[IfFlag(0)] public long sender_id; [IfFlag(0)] public Peer sender_id;
public long recipient_id; public Peer recipient_id;
public DateTime date; public DateTime date;
[IfFlag(1)] public TextWithEntities message; [IfFlag(1)] public TextWithEntities message;
@ -20166,4 +20206,97 @@ namespace TL
{ {
public int count; public int count;
} }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/payments.uniqueStarGift"/></para></summary>
[TLDef(0xCAA2F60B)]
public sealed partial class Payments_UniqueStarGift : IObject
{
public StarGiftBase gift;
public Dictionary<long, User> users;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messages.webPagePreview"/></para></summary>
[TLDef(0xB53E8B21)]
public sealed partial class Messages_WebPagePreview : IObject
{
public MessageMedia media;
public Dictionary<long, User> users;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/savedStarGift"/></para></summary>
[TLDef(0x6056DBA5)]
public sealed partial class SavedStarGift : IObject
{
public Flags flags;
[IfFlag(1)] public Peer from_id;
public DateTime date;
public StarGiftBase gift;
[IfFlag(2)] public TextWithEntities message;
[IfFlag(3)] public int msg_id;
[IfFlag(11)] public long saved_id;
[IfFlag(4)] public long convert_stars;
[IfFlag(6)] public long upgrade_stars;
[IfFlag(7)] public int can_export_at;
[IfFlag(8)] public long transfer_stars;
[Flags] public enum Flags : uint
{
name_hidden = 0x1,
has_from_id = 0x2,
has_message = 0x4,
has_msg_id = 0x8,
has_convert_stars = 0x10,
unsaved = 0x20,
has_upgrade_stars = 0x40,
has_can_export_at = 0x80,
has_transfer_stars = 0x100,
refunded = 0x200,
can_upgrade = 0x400,
has_saved_id = 0x800,
}
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/payments.savedStarGifts"/></para></summary>
[TLDef(0x95F389B1)]
public sealed partial class Payments_SavedStarGifts : IObject, IPeerResolver
{
public Flags flags;
public int count;
[IfFlag(1)] public bool chat_notifications_enabled;
public SavedStarGift[] gifts;
[IfFlag(0)] public string next_offset;
public Dictionary<long, ChatBase> chats;
public Dictionary<long, User> users;
[Flags] public enum Flags : uint
{
has_next_offset = 0x1,
has_chat_notifications_enabled = 0x2,
}
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
}
/// <summary><para>See <a href="https://corefork.telegram.org/type/InputSavedStarGift"/></para></summary>
public abstract partial class InputSavedStarGift : IObject { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputSavedStarGiftUser"/></para></summary>
[TLDef(0x69279795)]
public sealed partial class InputSavedStarGiftUser : InputSavedStarGift
{
public int msg_id;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputSavedStarGiftChat"/></para></summary>
[TLDef(0xF101AA7F)]
public sealed partial class InputSavedStarGiftChat : InputSavedStarGift
{
public InputPeer peer;
public long saved_id;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/payments.starGiftWithdrawalUrl"/></para></summary>
[TLDef(0x84AA3A9C)]
public sealed partial class Payments_StarGiftWithdrawalUrl : IObject
{
public string url;
}
} }

View file

@ -1107,7 +1107,7 @@ namespace TL
/// <summary>Set an <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a> <para>See <a href="https://corefork.telegram.org/method/account.updateEmojiStatus"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/account.updateEmojiStatus#possible-errors">details</a>)</para></summary> /// <summary>Set an <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a> <para>See <a href="https://corefork.telegram.org/method/account.updateEmojiStatus"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/account.updateEmojiStatus#possible-errors">details</a>)</para></summary>
/// <param name="emoji_status"><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a> to set</param> /// <param name="emoji_status"><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a> to set</param>
public static Task<bool> Account_UpdateEmojiStatus(this Client client, EmojiStatus emoji_status) public static Task<bool> Account_UpdateEmojiStatus(this Client client, EmojiStatusBase emoji_status)
=> client.Invoke(new Account_UpdateEmojiStatus => client.Invoke(new Account_UpdateEmojiStatus
{ {
emoji_status = emoji_status, emoji_status = emoji_status,
@ -1417,6 +1417,14 @@ namespace TL
settings = settings, settings = settings,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/account.getCollectibleEmojiStatuses"/></para></summary>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/account.emojiStatusesNotModified">account.emojiStatusesNotModified</a></returns>
public static Task<Account_EmojiStatuses> Account_GetCollectibleEmojiStatuses(this Client client, long hash = default)
=> client.Invoke(new Account_GetCollectibleEmojiStatuses
{
hash = hash,
});
/// <summary>Returns basic user info according to their identifiers. <para>See <a href="https://corefork.telegram.org/method/users.getUsers"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/users.getUsers#possible-errors">details</a>)</para></summary> /// <summary>Returns basic user info according to their identifiers. <para>See <a href="https://corefork.telegram.org/method/users.getUsers"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/users.getUsers#possible-errors">details</a>)</para></summary>
/// <param name="id">List of user identifiers</param> /// <param name="id">List of user identifiers</param>
public static Task<UserBase[]> Users_GetUsers(this Client client, params InputUserBase[] id) public static Task<UserBase[]> Users_GetUsers(this Client client, params InputUserBase[] id)
@ -1932,10 +1940,10 @@ namespace TL
/// <param name="schedule_date">Scheduled message date for scheduled messages</param> /// <param name="schedule_date">Scheduled message date for scheduled messages</param>
/// <param name="send_as">Forward the messages as the specified peer</param> /// <param name="send_as">Forward the messages as the specified peer</param>
/// <param name="quick_reply_shortcut">Add the messages to the specified <a href="https://corefork.telegram.org/api/business#quick-reply-shortcuts">quick reply shortcut »</a>, instead.</param> /// <param name="quick_reply_shortcut">Add the messages to the specified <a href="https://corefork.telegram.org/api/business#quick-reply-shortcuts">quick reply shortcut »</a>, instead.</param>
public static Task<UpdatesBase> Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false) public static Task<UpdatesBase> Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, int? video_timestamp = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false)
=> client.Invoke(new Messages_ForwardMessages => client.Invoke(new Messages_ForwardMessages
{ {
flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)), flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
from_peer = from_peer, from_peer = from_peer,
id = id, id = id,
random_id = random_id, random_id = random_id,
@ -1944,6 +1952,7 @@ namespace TL
schedule_date = schedule_date ?? default, schedule_date = schedule_date ?? default,
send_as = send_as, send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut, quick_reply_shortcut = quick_reply_shortcut,
video_timestamp = video_timestamp ?? default,
}); });
/// <summary>Report a new incoming chat for spam, if the <see cref="PeerSettings"/> of the chat allow us to do that <para>See <a href="https://corefork.telegram.org/method/messages.reportSpam"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.reportSpam#possible-errors">details</a>)</para></summary> /// <summary>Report a new incoming chat for spam, if the <see cref="PeerSettings"/> of the chat allow us to do that <para>See <a href="https://corefork.telegram.org/method/messages.reportSpam"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.reportSpam#possible-errors">details</a>)</para></summary>
@ -2202,8 +2211,7 @@ namespace TL
/// <summary>Get preview of webpage <para>See <a href="https://corefork.telegram.org/method/messages.getWebPagePreview"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getWebPagePreview#possible-errors">details</a>)</para></summary> /// <summary>Get preview of webpage <para>See <a href="https://corefork.telegram.org/method/messages.getWebPagePreview"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getWebPagePreview#possible-errors">details</a>)</para></summary>
/// <param name="message">Message from which to extract the preview</param> /// <param name="message">Message from which to extract the preview</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>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messageMediaEmpty">messageMediaEmpty</a></returns> public static Task<Messages_WebPagePreview> Messages_GetWebPagePreview(this Client client, string message, MessageEntity[] entities = null)
public static Task<MessageMedia> Messages_GetWebPagePreview(this Client client, string message, MessageEntity[] entities = null)
=> client.Invoke(new Messages_GetWebPagePreview => client.Invoke(new Messages_GetWebPagePreview
{ {
flags = (Messages_GetWebPagePreview.Flags)(entities != null ? 0x8 : 0), flags = (Messages_GetWebPagePreview.Flags)(entities != null ? 0x8 : 0),
@ -5488,7 +5496,7 @@ namespace TL
/// <summary>Set an <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a> for a channel or supergroup. <para>See <a href="https://corefork.telegram.org/method/channels.updateEmojiStatus"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.updateEmojiStatus#possible-errors">details</a>)</para></summary> /// <summary>Set an <a href="https://corefork.telegram.org/api/emoji-status">emoji status</a> for a channel or supergroup. <para>See <a href="https://corefork.telegram.org/method/channels.updateEmojiStatus"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.updateEmojiStatus#possible-errors">details</a>)</para></summary>
/// <param name="channel">The channel/supergroup, must have at least <a href="https://corefork.telegram.org/api/config#channel-emoji-status-level-min">channel_emoji_status_level_min</a>/<a href="https://corefork.telegram.org/api/config#group-emoji-status-level-min">group_emoji_status_level_min</a> boosts.</param> /// <param name="channel">The channel/supergroup, must have at least <a href="https://corefork.telegram.org/api/config#channel-emoji-status-level-min">channel_emoji_status_level_min</a>/<a href="https://corefork.telegram.org/api/config#group-emoji-status-level-min">group_emoji_status_level_min</a> boosts.</param>
/// <param name="emoji_status"><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a> to set</param> /// <param name="emoji_status"><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a> to set</param>
public static Task<UpdatesBase> Channels_UpdateEmojiStatus(this Client client, InputChannelBase channel, EmojiStatus emoji_status) public static Task<UpdatesBase> Channels_UpdateEmojiStatus(this Client client, InputChannelBase channel, EmojiStatusBase emoji_status)
=> client.Invoke(new Channels_UpdateEmojiStatus => client.Invoke(new Channels_UpdateEmojiStatus
{ {
channel = channel, channel = channel,
@ -5787,7 +5795,7 @@ namespace TL
/// <summary>Change the emoji status of a user (invoked by bots, see <a href="https://corefork.telegram.org/api/emoji-status#setting-an-emoji-status-from-a-bot">here »</a> for more info on the full flow) <para>See <a href="https://corefork.telegram.org/method/bots.updateUserEmojiStatus"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/bots.updateUserEmojiStatus#possible-errors">details</a>)</para></summary> /// <summary>Change the emoji status of a user (invoked by bots, see <a href="https://corefork.telegram.org/api/emoji-status#setting-an-emoji-status-from-a-bot">here »</a> for more info on the full flow) <para>See <a href="https://corefork.telegram.org/method/bots.updateUserEmojiStatus"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/bots.updateUserEmojiStatus#possible-errors">details</a>)</para></summary>
/// <param name="user_id">The user whose emoji status should be changed</param> /// <param name="user_id">The user whose emoji status should be changed</param>
/// <param name="emoji_status">The emoji status</param> /// <param name="emoji_status">The emoji status</param>
public static Task<bool> Bots_UpdateUserEmojiStatus(this Client client, InputUserBase user_id, EmojiStatus emoji_status) public static Task<bool> Bots_UpdateUserEmojiStatus(this Client client, InputUserBase user_id, EmojiStatusBase emoji_status)
=> client.Invoke(new Bots_UpdateUserEmojiStatus => client.Invoke(new Bots_UpdateUserEmojiStatus
{ {
user_id = user_id, user_id = user_id,
@ -5849,7 +5857,6 @@ namespace TL
public static Task<Users_Users> Bots_GetBotRecommendations(this Client client, InputUserBase bot) public static Task<Users_Users> Bots_GetBotRecommendations(this Client client, InputUserBase bot)
=> client.Invoke(new Bots_GetBotRecommendations => client.Invoke(new Bots_GetBotRecommendations
{ {
flags = 0,
bot = bot, bot = bot,
}); });
@ -6162,34 +6169,20 @@ namespace TL
hash = hash, hash = hash,
}); });
/// <summary>Get the <a href="https://corefork.telegram.org/api/gifts">gifts »</a> pinned on a specific user's profile. <para>See <a href="https://corefork.telegram.org/method/payments.getUserStarGifts"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.getUserStarGifts#possible-errors">details</a>)</para></summary>
/// <param name="user_id">Identifier of the user (can be the current user to fetch all gifts received by the current user).</param>
/// <param name="offset">Offset for <a href="https://corefork.telegram.org/api/offsets">pagination</a>, taken from <see cref="Payments_UserStarGifts"/> (initially empty).</param>
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a></param>
public static Task<Payments_UserStarGifts> Payments_GetUserStarGifts(this Client client, InputUserBase user_id, string offset, int limit = int.MaxValue)
=> client.Invoke(new Payments_GetUserStarGifts
{
user_id = user_id,
offset = offset,
limit = limit,
});
/// <summary>Display or remove a <a href="https://corefork.telegram.org/api/gifts">received gift »</a> from our profile. <para>See <a href="https://corefork.telegram.org/method/payments.saveStarGift"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.saveStarGift#possible-errors">details</a>)</para></summary> /// <summary>Display or remove a <a href="https://corefork.telegram.org/api/gifts">received gift »</a> from our profile. <para>See <a href="https://corefork.telegram.org/method/payments.saveStarGift"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.saveStarGift#possible-errors">details</a>)</para></summary>
/// <param name="unsave">If set, hides the gift from our profile.</param> /// <param name="unsave">If set, hides the gift from our profile.</param>
/// <param name="msg_id">The ID of the <see cref="MessageService"/> with the <see cref="MessageActionStarGift"/>.</param> public static Task<bool> Payments_SaveStarGift(this Client client, InputSavedStarGift stargift, bool unsave = false)
public static Task<bool> Payments_SaveStarGift(this Client client, int msg_id, bool unsave = false)
=> client.Invoke(new Payments_SaveStarGift => client.Invoke(new Payments_SaveStarGift
{ {
flags = (Payments_SaveStarGift.Flags)(unsave ? 0x1 : 0), flags = (Payments_SaveStarGift.Flags)(unsave ? 0x1 : 0),
msg_id = msg_id, stargift = stargift,
}); });
/// <summary>Convert a <a href="https://corefork.telegram.org/api/gifts">received gift »</a> into Telegram Stars: this will permanently destroy the gift, converting it into <see cref="StarGift"/>.<c>convert_stars</c> <a href="https://corefork.telegram.org/api/stars">Telegram Stars</a>, added to the user's balance. <para>See <a href="https://corefork.telegram.org/method/payments.convertStarGift"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.convertStarGift#possible-errors">details</a>)</para></summary> /// <summary>Convert a <a href="https://corefork.telegram.org/api/gifts">received gift »</a> into Telegram Stars: this will permanently destroy the gift, converting it into <see cref="StarGift"/>.<c>convert_stars</c> <a href="https://corefork.telegram.org/api/stars">Telegram Stars</a>, added to the user's balance. <para>See <a href="https://corefork.telegram.org/method/payments.convertStarGift"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.convertStarGift#possible-errors">details</a>)</para></summary>
/// <param name="msg_id">The ID of the <see cref="MessageService"/> with the <see cref="MessageActionStarGift"/>.</param> public static Task<bool> Payments_ConvertStarGift(this Client client, InputSavedStarGift stargift)
public static Task<bool> Payments_ConvertStarGift(this Client client, int msg_id)
=> client.Invoke(new Payments_ConvertStarGift => client.Invoke(new Payments_ConvertStarGift
{ {
msg_id = msg_id, stargift = stargift,
}); });
/// <summary>Cancel a <a href="https://corefork.telegram.org/api/subscriptions#bot-subscriptions">bot subscription</a> <para>See <a href="https://corefork.telegram.org/method/payments.botCancelStarsSubscription"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.botCancelStarsSubscription#possible-errors">details</a>)</para></summary> /// <summary>Cancel a <a href="https://corefork.telegram.org/api/subscriptions#bot-subscriptions">bot subscription</a> <para>See <a href="https://corefork.telegram.org/method/payments.botCancelStarsSubscription"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.botCancelStarsSubscription#possible-errors">details</a>)</para></summary>
@ -6274,26 +6267,59 @@ namespace TL
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.upgradeStarGift"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/payments.upgradeStarGift"/></para></summary>
public static Task<UpdatesBase> Payments_UpgradeStarGift(this Client client, int msg_id, bool keep_original_details = false) public static Task<UpdatesBase> Payments_UpgradeStarGift(this Client client, InputSavedStarGift stargift, bool keep_original_details = false)
=> client.Invoke(new Payments_UpgradeStarGift => client.Invoke(new Payments_UpgradeStarGift
{ {
flags = (Payments_UpgradeStarGift.Flags)(keep_original_details ? 0x1 : 0), flags = (Payments_UpgradeStarGift.Flags)(keep_original_details ? 0x1 : 0),
msg_id = msg_id, stargift = stargift,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.transferStarGift"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/payments.transferStarGift"/></para></summary>
public static Task<UpdatesBase> Payments_TransferStarGift(this Client client, int msg_id, InputUserBase to_id) public static Task<UpdatesBase> Payments_TransferStarGift(this Client client, InputSavedStarGift stargift, InputPeer to_id)
=> client.Invoke(new Payments_TransferStarGift => client.Invoke(new Payments_TransferStarGift
{ {
msg_id = msg_id, stargift = stargift,
to_id = to_id, to_id = to_id,
}); });
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.getUserStarGift"/></para></summary> /// <summary><para>See <a href="https://corefork.telegram.org/method/payments.getUniqueStarGift"/></para></summary>
public static Task<Payments_UserStarGifts> Payments_GetUserStarGift(this Client client, params int[] msg_id) public static Task<Payments_UniqueStarGift> Payments_GetUniqueStarGift(this Client client, string slug)
=> client.Invoke(new Payments_GetUserStarGift => client.Invoke(new Payments_GetUniqueStarGift
{ {
msg_id = msg_id, slug = slug,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.getSavedStarGifts"/></para></summary>
public static Task<Payments_SavedStarGifts> Payments_GetSavedStarGifts(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, bool exclude_unsaved = false, bool exclude_saved = false, bool exclude_unlimited = false, bool exclude_limited = false, bool exclude_unique = false, bool sort_by_value = false)
=> client.Invoke(new Payments_GetSavedStarGifts
{
flags = (Payments_GetSavedStarGifts.Flags)((exclude_unsaved ? 0x1 : 0) | (exclude_saved ? 0x2 : 0) | (exclude_unlimited ? 0x4 : 0) | (exclude_limited ? 0x8 : 0) | (exclude_unique ? 0x10 : 0) | (sort_by_value ? 0x20 : 0)),
peer = peer,
offset = offset,
limit = limit,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.getSavedStarGift"/></para></summary>
public static Task<Payments_SavedStarGifts> Payments_GetSavedStarGift(this Client client, params InputSavedStarGift[] stargift)
=> client.Invoke(new Payments_GetSavedStarGift
{
stargift = stargift,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.getStarGiftWithdrawalUrl"/></para></summary>
public static Task<Payments_StarGiftWithdrawalUrl> Payments_GetStarGiftWithdrawalUrl(this Client client, InputSavedStarGift stargift, InputCheckPasswordSRP password)
=> client.Invoke(new Payments_GetStarGiftWithdrawalUrl
{
stargift = stargift,
password = password,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/payments.toggleChatStarGiftNotifications"/></para></summary>
public static Task<bool> Payments_ToggleChatStarGiftNotifications(this Client client, InputPeer peer, bool enabled = false)
=> client.Invoke(new Payments_ToggleChatStarGiftNotifications
{
flags = (Payments_ToggleChatStarGiftNotifications.Flags)(enabled ? 0x1 : 0),
peer = peer,
}); });
/// <summary>Create a stickerset. <para>See <a href="https://corefork.telegram.org/method/stickers.createStickerSet"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stickers.createStickerSet#possible-errors">details</a>)</para></summary> /// <summary>Create a stickerset. <para>See <a href="https://corefork.telegram.org/method/stickers.createStickerSet"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stickers.createStickerSet#possible-errors">details</a>)</para></summary>
@ -8352,7 +8378,7 @@ namespace TL.Methods
[TLDef(0xFBD3DE6B)] [TLDef(0xFBD3DE6B)]
public sealed partial class Account_UpdateEmojiStatus : IMethod<bool> public sealed partial class Account_UpdateEmojiStatus : IMethod<bool>
{ {
public EmojiStatus emoji_status; public EmojiStatusBase emoji_status;
} }
[TLDef(0xD6753386)] [TLDef(0xD6753386)]
@ -8615,6 +8641,12 @@ namespace TL.Methods
public ReactionsNotifySettings settings; public ReactionsNotifySettings settings;
} }
[TLDef(0x2E7B4543)]
public sealed partial class Account_GetCollectibleEmojiStatuses : IMethod<Account_EmojiStatuses>
{
public long hash;
}
[TLDef(0x0D91A548)] [TLDef(0x0D91A548)]
public sealed partial class Users_GetUsers : IMethod<UserBase[]> public sealed partial class Users_GetUsers : IMethod<UserBase[]>
{ {
@ -9050,7 +9082,7 @@ namespace TL.Methods
} }
} }
[TLDef(0xD5039208)] [TLDef(0x6D74DA08)]
public sealed partial class Messages_ForwardMessages : IMethod<UpdatesBase> public sealed partial class Messages_ForwardMessages : IMethod<UpdatesBase>
{ {
public Flags flags; public Flags flags;
@ -9062,6 +9094,7 @@ namespace TL.Methods
[IfFlag(10)] public DateTime schedule_date; [IfFlag(10)] public DateTime schedule_date;
[IfFlag(13)] public InputPeer send_as; [IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut; [IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
[IfFlag(20)] public int video_timestamp;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -9076,6 +9109,7 @@ namespace TL.Methods
noforwards = 0x4000, noforwards = 0x4000,
has_quick_reply_shortcut = 0x20000, has_quick_reply_shortcut = 0x20000,
allow_paid_floodskip = 0x80000, allow_paid_floodskip = 0x80000,
has_video_timestamp = 0x100000,
} }
} }
@ -9278,8 +9312,8 @@ namespace TL.Methods
public long hash; public long hash;
} }
[TLDef(0x8B68B0CC)] [TLDef(0x570D6F6F)]
public sealed partial class Messages_GetWebPagePreview : IMethod<MessageMedia> public sealed partial class Messages_GetWebPagePreview : IMethod<Messages_WebPagePreview>
{ {
public Flags flags; public Flags flags;
public string message; public string message;
@ -12012,7 +12046,7 @@ namespace TL.Methods
public sealed partial class Channels_UpdateEmojiStatus : IMethod<UpdatesBase> public sealed partial class Channels_UpdateEmojiStatus : IMethod<UpdatesBase>
{ {
public InputChannelBase channel; public InputChannelBase channel;
public EmojiStatus emoji_status; public EmojiStatusBase emoji_status;
} }
[TLDef(0xAD399CEE)] [TLDef(0xAD399CEE)]
@ -12231,7 +12265,7 @@ namespace TL.Methods
public sealed partial class Bots_UpdateUserEmojiStatus : IMethod<bool> public sealed partial class Bots_UpdateUserEmojiStatus : IMethod<bool>
{ {
public InputUserBase user_id; public InputUserBase user_id;
public EmojiStatus emoji_status; public EmojiStatusBase emoji_status;
} }
[TLDef(0x06DE6392)] [TLDef(0x06DE6392)]
@ -12282,15 +12316,10 @@ namespace TL.Methods
} }
} }
[TLDef(0x2855BE61)] [TLDef(0xA1B70815)]
public sealed partial class Bots_GetBotRecommendations : IMethod<Users_Users> public sealed partial class Bots_GetBotRecommendations : IMethod<Users_Users>
{ {
public Flags flags;
public InputUserBase bot; public InputUserBase bot;
[Flags] public enum Flags : uint
{
}
} }
[TLDef(0x37148DBB)] [TLDef(0x37148DBB)]
@ -12560,19 +12589,11 @@ namespace TL.Methods
public int hash; public int hash;
} }
[TLDef(0x5E72C7E1)] [TLDef(0x2A2A697C)]
public sealed partial class Payments_GetUserStarGifts : IMethod<Payments_UserStarGifts>
{
public InputUserBase user_id;
public string offset;
public int limit;
}
[TLDef(0x92FD2AAE)]
public sealed partial class Payments_SaveStarGift : IMethod<bool> public sealed partial class Payments_SaveStarGift : IMethod<bool>
{ {
public Flags flags; public Flags flags;
public int msg_id; public InputSavedStarGift stargift;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -12580,10 +12601,10 @@ namespace TL.Methods
} }
} }
[TLDef(0x72770C83)] [TLDef(0x74BF076B)]
public sealed partial class Payments_ConvertStarGift : IMethod<bool> public sealed partial class Payments_ConvertStarGift : IMethod<bool>
{ {
public int msg_id; public InputSavedStarGift stargift;
} }
[TLDef(0x6DFA0622)] [TLDef(0x6DFA0622)]
@ -12662,11 +12683,11 @@ namespace TL.Methods
public long gift_id; public long gift_id;
} }
[TLDef(0xCF4F0781)] [TLDef(0xAED6E4F5)]
public sealed partial class Payments_UpgradeStarGift : IMethod<UpdatesBase> public sealed partial class Payments_UpgradeStarGift : IMethod<UpdatesBase>
{ {
public Flags flags; public Flags flags;
public int msg_id; public InputSavedStarGift stargift;
[Flags] public enum Flags : uint [Flags] public enum Flags : uint
{ {
@ -12674,17 +12695,61 @@ namespace TL.Methods
} }
} }
[TLDef(0x333FB526)] [TLDef(0x7F18176A)]
public sealed partial class Payments_TransferStarGift : IMethod<UpdatesBase> public sealed partial class Payments_TransferStarGift : IMethod<UpdatesBase>
{ {
public int msg_id; public InputSavedStarGift stargift;
public InputUserBase to_id; public InputPeer to_id;
} }
[TLDef(0xB502E4A5)] [TLDef(0xA1974D72)]
public sealed partial class Payments_GetUserStarGift : IMethod<Payments_UserStarGifts> public sealed partial class Payments_GetUniqueStarGift : IMethod<Payments_UniqueStarGift>
{ {
public int[] msg_id; public string slug;
}
[TLDef(0x23830DE9)]
public sealed partial class Payments_GetSavedStarGifts : IMethod<Payments_SavedStarGifts>
{
public Flags flags;
public InputPeer peer;
public string offset;
public int limit;
[Flags] public enum Flags : uint
{
exclude_unsaved = 0x1,
exclude_saved = 0x2,
exclude_unlimited = 0x4,
exclude_limited = 0x8,
exclude_unique = 0x10,
sort_by_value = 0x20,
}
}
[TLDef(0xB455A106)]
public sealed partial class Payments_GetSavedStarGift : IMethod<Payments_SavedStarGifts>
{
public InputSavedStarGift[] stargift;
}
[TLDef(0xD06E93A8)]
public sealed partial class Payments_GetStarGiftWithdrawalUrl : IMethod<Payments_StarGiftWithdrawalUrl>
{
public InputSavedStarGift stargift;
public InputCheckPasswordSRP password;
}
[TLDef(0x60EAEFA1)]
public sealed partial class Payments_ToggleChatStarGiftNotifications : IMethod<bool>
{
public Flags flags;
public InputPeer peer;
[Flags] public enum Flags : uint
{
enabled = 0x1,
}
} }
[TLDef(0x9021AB67)] [TLDef(0x9021AB67)]

View file

@ -6,7 +6,7 @@ namespace TL
{ {
public static partial class Layer public static partial class Layer
{ {
public const int Version = 196; // fetched 02/01/2025 13:18:52 public const int Version = 198; // fetched 22/01/2025 22:22:20
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;
@ -90,11 +90,11 @@ namespace TL
[0xB3BA0635] = typeof(InputMediaPhoto), [0xB3BA0635] = typeof(InputMediaPhoto),
[0xF9C44144] = typeof(InputMediaGeoPoint), [0xF9C44144] = typeof(InputMediaGeoPoint),
[0xF8AB7DFB] = typeof(InputMediaContact), [0xF8AB7DFB] = typeof(InputMediaContact),
[0x5B38C6C1] = typeof(InputMediaUploadedDocument), [0x037C9330] = typeof(InputMediaUploadedDocument),
[0x33473058] = typeof(InputMediaDocument), [0xA8763AB5] = typeof(InputMediaDocument),
[0xC13D1C11] = typeof(InputMediaVenue), [0xC13D1C11] = typeof(InputMediaVenue),
[0xE5BBFE1A] = typeof(InputMediaPhotoExternal), [0xE5BBFE1A] = typeof(InputMediaPhotoExternal),
[0xFB52DC99] = typeof(InputMediaDocumentExternal), [0x779600F9] = typeof(InputMediaDocumentExternal),
[0xD33F43F3] = typeof(InputMediaGame), [0xD33F43F3] = typeof(InputMediaGame),
[0x405FEF0D] = typeof(InputMediaInvoice), [0x405FEF0D] = typeof(InputMediaInvoice),
[0x971FA843] = typeof(InputMediaGeoLive), [0x971FA843] = typeof(InputMediaGeoLive),
@ -139,7 +139,7 @@ namespace TL
[0xE00998B7] = typeof(Channel), [0xE00998B7] = typeof(Channel),
[0x17D493D5] = typeof(ChannelForbidden), [0x17D493D5] = typeof(ChannelForbidden),
[0x2633421B] = typeof(ChatFull), [0x2633421B] = typeof(ChatFull),
[0x9FF3B858] = typeof(ChannelFull), [0x52D6806B] = typeof(ChannelFull),
[0xC02D4007] = typeof(ChatParticipant), [0xC02D4007] = typeof(ChatParticipant),
[0xE46BCEE4] = typeof(ChatParticipantCreator), [0xE46BCEE4] = typeof(ChatParticipantCreator),
[0xA0933F5B] = typeof(ChatParticipantAdmin), [0xA0933F5B] = typeof(ChatParticipantAdmin),
@ -155,7 +155,7 @@ namespace TL
[0x56E0D474] = typeof(MessageMediaGeo), [0x56E0D474] = typeof(MessageMediaGeo),
[0x70322949] = typeof(MessageMediaContact), [0x70322949] = typeof(MessageMediaContact),
[0x9F84F49E] = typeof(MessageMediaUnsupported), [0x9F84F49E] = typeof(MessageMediaUnsupported),
[0xDD570BD5] = typeof(MessageMediaDocument), [0x52D8CCD9] = typeof(MessageMediaDocument),
[0xDDF10C3B] = typeof(MessageMediaWebPage), [0xDDF10C3B] = typeof(MessageMediaWebPage),
[0x2EC0533F] = typeof(MessageMediaVenue), [0x2EC0533F] = typeof(MessageMediaVenue),
[0xFDB19008] = typeof(MessageMediaGame), [0xFDB19008] = typeof(MessageMediaGame),
@ -213,8 +213,8 @@ namespace TL
[0x41B3E202] = typeof(MessageActionPaymentRefunded), [0x41B3E202] = typeof(MessageActionPaymentRefunded),
[0x45D5B021] = typeof(MessageActionGiftStars), [0x45D5B021] = typeof(MessageActionGiftStars),
[0xB00C47A2] = typeof(MessageActionPrizeStars), [0xB00C47A2] = typeof(MessageActionPrizeStars),
[0xD8F4F0A7] = typeof(MessageActionStarGift), [0x4717E8A4] = typeof(MessageActionStarGift),
[0x26077B99] = typeof(MessageActionStarGiftUnique), [0xACDFCB81] = typeof(MessageActionStarGiftUnique),
[0xD58A08C6] = typeof(Dialog), [0xD58A08C6] = typeof(Dialog),
[0x71BD134C] = typeof(DialogFolder), [0x71BD134C] = typeof(DialogFolder),
[0x2331B22D] = typeof(PhotoEmpty), [0x2331B22D] = typeof(PhotoEmpty),
@ -989,6 +989,7 @@ namespace TL
[0x54B56617] = typeof(WebPageAttributeTheme), [0x54B56617] = typeof(WebPageAttributeTheme),
[0x2E94C3E7] = typeof(WebPageAttributeStory), [0x2E94C3E7] = typeof(WebPageAttributeStory),
[0x50CC03D3] = typeof(WebPageAttributeStickerSet), [0x50CC03D3] = typeof(WebPageAttributeStickerSet),
[0xCF6F6DB8] = typeof(WebPageAttributeUniqueStarGift),
[0x4899484E] = typeof(Messages_VotesList), [0x4899484E] = typeof(Messages_VotesList),
[0xF568028A] = typeof(BankCardOpenUrl), [0xF568028A] = typeof(BankCardOpenUrl),
[0x3E24E573] = typeof(Payments_BankCardData), [0x3E24E573] = typeof(Payments_BankCardData),
@ -1102,9 +1103,9 @@ namespace TL
[0x98986C0D] = typeof(InputInvoicePremiumGiftCode), [0x98986C0D] = typeof(InputInvoicePremiumGiftCode),
[0x65F00CE3] = typeof(InputInvoiceStars), [0x65F00CE3] = typeof(InputInvoiceStars),
[0x34E793F1] = typeof(InputInvoiceChatInviteSubscription), [0x34E793F1] = typeof(InputInvoiceChatInviteSubscription),
[0x25D8C1D8] = typeof(InputInvoiceStarGift), [0xE8625E92] = typeof(InputInvoiceStarGift),
[0x5EBE7262] = typeof(InputInvoiceStarGiftUpgrade), [0x4D818D5D] = typeof(InputInvoiceStarGiftUpgrade),
[0xAE3BA9ED] = typeof(InputInvoiceStarGiftTransfer), [0x4A5F5BD9] = typeof(InputInvoiceStarGiftTransfer),
[0xAED0CBD9] = typeof(Payments_ExportedInvoice), [0xAED0CBD9] = typeof(Payments_ExportedInvoice),
[0xCFB9D957] = typeof(Messages_TranscribedAudio), [0xCFB9D957] = typeof(Messages_TranscribedAudio),
[0x5334759C] = typeof(Help_PremiumPromo), [0x5334759C] = typeof(Help_PremiumPromo),
@ -1118,8 +1119,9 @@ namespace TL
[0x74C34319] = typeof(PremiumGiftOption), [0x74C34319] = typeof(PremiumGiftOption),
[0x88F8F21B] = typeof(PaymentFormMethod), [0x88F8F21B] = typeof(PaymentFormMethod),
[0x2DE11AAE] = null,//EmojiStatusEmpty [0x2DE11AAE] = null,//EmojiStatusEmpty
[0x929B619D] = typeof(EmojiStatus), [0xE7FF068A] = typeof(EmojiStatus),
[0xFA30A8C7] = typeof(EmojiStatusUntil), [0x7184603B] = typeof(EmojiStatusCollectible),
[0x07141DBF] = typeof(InputEmojiStatusCollectible),
[0xD08CE645] = null,//Account_EmojiStatusesNotModified [0xD08CE645] = null,//Account_EmojiStatusesNotModified
[0x90C467D1] = typeof(Account_EmojiStatuses), [0x90C467D1] = typeof(Account_EmojiStatuses),
[0x79F5D419] = null,//ReactionEmpty [0x79F5D419] = null,//ReactionEmpty
@ -1210,6 +1212,7 @@ namespace TL
[0x2271F2BF] = typeof(InputMediaAreaChannelPost), [0x2271F2BF] = typeof(InputMediaAreaChannelPost),
[0x37381085] = typeof(MediaAreaUrl), [0x37381085] = typeof(MediaAreaUrl),
[0x49A6549C] = typeof(MediaAreaWeather), [0x49A6549C] = typeof(MediaAreaWeather),
[0x5787686D] = typeof(MediaAreaStarGift),
[0x9A35E999] = typeof(PeerStories), [0x9A35E999] = typeof(PeerStories),
[0xCAE68768] = typeof(Stories_PeerStories), [0xCAE68768] = typeof(Stories_PeerStories),
[0xFD5E12BD] = typeof(Messages_WebPage), [0xFD5E12BD] = typeof(Messages_WebPage),
@ -1341,11 +1344,9 @@ namespace TL
[0x94CE852A] = typeof(StarsGiveawayOption), [0x94CE852A] = typeof(StarsGiveawayOption),
[0x54236209] = typeof(StarsGiveawayWinnersOption), [0x54236209] = typeof(StarsGiveawayWinnersOption),
[0x02CC73C8] = typeof(StarGift), [0x02CC73C8] = typeof(StarGift),
[0x6A1407CD] = typeof(StarGiftUnique), [0xF2FE7E4A] = typeof(StarGiftUnique),
[0xA388A368] = null,//Payments_StarGiftsNotModified [0xA388A368] = null,//Payments_StarGiftsNotModified
[0x901689EA] = typeof(Payments_StarGifts), [0x901689EA] = typeof(Payments_StarGifts),
[0x325835E1] = typeof(UserStarGift),
[0x6B65B517] = typeof(Payments_UserStarGifts),
[0x7903E3D9] = typeof(MessageReportOption), [0x7903E3D9] = typeof(MessageReportOption),
[0xF0E4E0B6] = typeof(ReportResultChooseOption), [0xF0E4E0B6] = typeof(ReportResultChooseOption),
[0x6F09AC31] = typeof(ReportResultAddComment), [0x6F09AC31] = typeof(ReportResultAddComment),
@ -1365,10 +1366,17 @@ namespace TL
[0x39D99013] = typeof(StarGiftAttributeModel), [0x39D99013] = typeof(StarGiftAttributeModel),
[0x13ACFF19] = typeof(StarGiftAttributePattern), [0x13ACFF19] = typeof(StarGiftAttributePattern),
[0x94271762] = typeof(StarGiftAttributeBackdrop), [0x94271762] = typeof(StarGiftAttributeBackdrop),
[0xC02C4F4B] = typeof(StarGiftAttributeOriginalDetails), [0xE0BFF26C] = typeof(StarGiftAttributeOriginalDetails),
[0x167BD90B] = typeof(Payments_StarGiftUpgradePreview), [0x167BD90B] = typeof(Payments_StarGiftUpgradePreview),
[0x62D706B8] = typeof(Users_Users), [0x62D706B8] = typeof(Users_Users),
[0x315A4974] = typeof(Users_UsersSlice), [0x315A4974] = typeof(Users_UsersSlice),
[0xCAA2F60B] = typeof(Payments_UniqueStarGift),
[0xB53E8B21] = typeof(Messages_WebPagePreview),
[0x6056DBA5] = typeof(SavedStarGift),
[0x95F389B1] = typeof(Payments_SavedStarGifts),
[0x69279795] = typeof(InputSavedStarGiftUser),
[0xF101AA7F] = typeof(InputSavedStarGiftChat),
[0x84AA3A9C] = typeof(Payments_StarGiftWithdrawalUrl),
// from TL.Secret: // from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument), [0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote), [0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),
@ -1488,6 +1496,7 @@ namespace TL
[typeof(ChatReactions)] = 0xEAFC32BC, //chatReactionsNone [typeof(ChatReactions)] = 0xEAFC32BC, //chatReactionsNone
[typeof(Messages_Reactions)] = 0xB06FDBDF, //messages.reactionsNotModified [typeof(Messages_Reactions)] = 0xB06FDBDF, //messages.reactionsNotModified
// from TL.Secret: // from TL.Secret:
[typeof(EmojiStatusBase)] = 0x2DE11AAE, //emojiStatusEmpty
[typeof(EmojiList)] = 0x481EADFA, //emojiListNotModified [typeof(EmojiList)] = 0x481EADFA, //emojiListNotModified
[typeof(Messages_EmojiGroups)] = 0x6FB4AD87, //messages.emojiGroupsNotModified [typeof(Messages_EmojiGroups)] = 0x6FB4AD87, //messages.emojiGroupsNotModified
[typeof(Help_AppConfig)] = 0x7CDE641D, //help.appConfigNotModified [typeof(Help_AppConfig)] = 0x7CDE641D, //help.appConfigNotModified

View file

@ -13,7 +13,7 @@
<PackageId>WTelegramClient</PackageId> <PackageId>WTelegramClient</PackageId>
<Version>0.0.0</Version> <Version>0.0.0</Version>
<Authors>Wizou</Authors> <Authors>Wizou</Authors>
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 196 <Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 198
Release Notes: Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description> $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>