From c872a51a3161539679a2d814a846a3aeff3f0214 Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Fri, 21 Jul 2023 10:52:46 +0200
Subject: [PATCH] API Layer 160: Stories & more...
---
README.md | 2 +-
src/Client.Helpers.cs | 6 +-
src/TL.Schema.cs | 475 +++++++++++++++++++++++++++++------
src/TL.SchemaFuncs.cs | 502 ++++++++++++++++++++++++++++++-------
src/TL.Secret.cs | 20 ++
src/TL.Table.cs | 58 +++--
src/WTelegramClient.csproj | 2 +-
7 files changed, 874 insertions(+), 191 deletions(-)
diff --git a/README.md b/README.md
index d985682..38cb622 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[](https://corefork.telegram.org/methods)
+[](https://corefork.telegram.org/methods)
[](https://www.nuget.org/packages/WTelegramClient/)
[](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
[](https://www.buymeacoffee.com/wizou)
diff --git a/src/Client.Helpers.cs b/src/Client.Helpers.cs
index 28602c8..c4e29c1 100644
--- a/src/Client.Helpers.cs
+++ b/src/Client.Helpers.cs
@@ -146,10 +146,10 @@ namespace WTelegram
long random_id = Helpers.RandomLong();
if (media == null)
updates = await this.Messages_SendMessage(peer, text, random_id, no_webpage: disable_preview, entities: entities,
- reply_to_msg_id: reply_to_msg_id == 0 ? null : reply_to_msg_id, schedule_date: schedule_date == default ? null : schedule_date);
+ reply_to: reply_to_msg_id == 0 ? null : new InputReplyToMessage { reply_to_msg_id = reply_to_msg_id }, schedule_date: schedule_date == default ? null : schedule_date);
else
updates = await this.Messages_SendMedia(peer, media, text, random_id, entities: entities,
- reply_to_msg_id: reply_to_msg_id == 0 ? null : reply_to_msg_id, schedule_date: schedule_date == default ? null : schedule_date);
+ reply_to: reply_to_msg_id == 0 ? null : new InputReplyToMessage { reply_to_msg_id = reply_to_msg_id }, schedule_date: schedule_date == default ? null : schedule_date);
RaiseUpdate(updates);
int msgId = -1;
if (updates is UpdateShortSentMessage sent)
@@ -242,7 +242,7 @@ namespace WTelegram
lastMedia.entities = entities;
if (entities != null) lastMedia.flags = InputSingleMedia.Flags.has_entities;
- var updates = await this.Messages_SendMultiMedia(peer, multiMedia, reply_to_msg_id: reply_to_msg_id, schedule_date: schedule_date);
+ var updates = await this.Messages_SendMultiMedia(peer, multiMedia, reply_to: reply_to_msg_id == 0 ? null : new InputReplyToMessage { reply_to_msg_id = reply_to_msg_id }, schedule_date: schedule_date);
RaiseUpdate(updates);
var msgIds = new int[length];
var result = new Message[length];
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 6cc28d1..d848398 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -455,6 +455,13 @@ namespace TL
/// The emoji, for now 🏀, 🎲 and 🎯 are supported
public string emoticon;
}
+ /// See
+ [TLDef(0x9A86B58F)]
+ public class InputMediaStory : InputMedia
+ {
+ public InputUserBase user_id;
+ public int id;
+ }
/// Defines a new group profile photo. See Derived classes: ,
/// a value means inputChatPhotoEmpty
@@ -716,7 +723,7 @@ namespace TL
public long id;
}
/// Indicates info about a certain user See
- [TLDef(0x8F97C628)]
+ [TLDef(0xABB5F120)]
public partial class User : UserBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -751,6 +758,7 @@ namespace TL
[IfFlag(30)] public EmojiStatus emoji_status;
/// Additional usernames
[IfFlag(32)] public Username[] usernames;
+ [IfFlag(37)] public int stories_max_id;
[Flags] public enum Flags : uint
{
@@ -818,6 +826,11 @@ namespace TL
has_usernames = 0x1,
/// Whether we can edit the profile picture, name, about text and description of this bot because we own it.
bot_can_edit = 0x2,
+ close_friend = 0x4,
+ stories_hidden = 0x8,
+ stories_unavailable = 0x10,
+ /// Field has a value
+ has_stories_max_id = 0x20,
}
}
@@ -1523,7 +1536,7 @@ namespace TL
/// Peer ID, the chat where this message was sent
public virtual Peer Peer { get; }
/// Reply information
- public virtual MessageReplyHeader ReplyTo { get; }
+ public virtual MessageReplyHeaderBase ReplyTo { get; }
/// Date of the message
public virtual DateTime Date { get; }
/// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
@@ -1568,7 +1581,7 @@ namespace TL
/// ID of the inline bot that generated the message
[IfFlag(11)] public long via_bot_id;
/// Reply information
- [IfFlag(3)] public MessageReplyHeader reply_to;
+ [IfFlag(3)] public MessageReplyHeaderBase reply_to;
/// Date of the message
public DateTime date;
/// The message
@@ -1659,7 +1672,7 @@ namespace TL
/// Peer ID, the chat where this message was sent
public override Peer Peer => peer_id;
/// Reply information
- public override MessageReplyHeader ReplyTo => reply_to;
+ public override MessageReplyHeaderBase ReplyTo => reply_to;
/// Date of the message
public override DateTime Date => date;
/// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
@@ -1678,7 +1691,7 @@ namespace TL
/// Sender of service message
public Peer peer_id;
/// Reply (thread) information
- [IfFlag(3)] public MessageReplyHeader reply_to;
+ [IfFlag(3)] public MessageReplyHeaderBase reply_to;
/// Message date
public DateTime date;
/// Event connected with the service message
@@ -1715,7 +1728,7 @@ namespace TL
/// Sender of service message
public override Peer Peer => peer_id;
/// Reply (thread) information
- public override MessageReplyHeader ReplyTo => reply_to;
+ public override MessageReplyHeaderBase ReplyTo => reply_to;
/// Message date
public override DateTime Date => date;
/// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
@@ -1772,13 +1785,14 @@ namespace TL
[TLDef(0x9F84F49E)]
public class MessageMediaUnsupported : MessageMedia { }
/// Document (video, audio, voice, sticker, any media type except photo) See
- [TLDef(0x9CB070D7)]
+ [TLDef(0x4CF4D72D)]
public partial class MessageMediaDocument : MessageMedia
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// Attached document
[IfFlag(0)] public DocumentBase document;
+ [IfFlag(5)] public DocumentBase alt_document;
/// Time to live of self-destructing document
[IfFlag(2)] public int ttl_seconds;
@@ -1792,6 +1806,8 @@ namespace TL
nopremium = 0x8,
/// Whether this media should be hidden behind a spoiler warning
spoiler = 0x10,
+ /// Field has a value
+ has_alt_document = 0x20,
}
}
/// Preview of webpage See
@@ -1903,6 +1919,21 @@ namespace TL
/// The emoji, for now 🏀, 🎲 and 🎯 are supported
public string emoticon;
}
+ /// See
+ [TLDef(0xCBB20D88)]
+ public class MessageMediaStory : MessageMedia
+ {
+ public Flags flags;
+ public long user_id;
+ public int id;
+ [IfFlag(0)] public StoryItemBase story;
+
+ [Flags] public enum Flags : uint
+ {
+ has_story = 0x1,
+ via_mention = 0x2,
+ }
+ }
/// Object describing actions connected to a service message. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
/// a value means messageActionEmpty
@@ -2661,7 +2692,7 @@ namespace TL
}
/// Notification settings. See
- [TLDef(0xDF1F002B)]
+ [TLDef(0xCACB6AE2)]
public class InputPeerNotifySettings : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -2674,6 +2705,9 @@ namespace TL
[IfFlag(2)] public int mute_until;
/// Name of an audio file for notification
[IfFlag(3)] public NotificationSound sound;
+ [IfFlag(6)] public bool stories_muted;
+ [IfFlag(7)] public bool stories_hide_sender;
+ [IfFlag(8)] public NotificationSound stories_sound;
[Flags] public enum Flags : uint
{
@@ -2685,11 +2719,17 @@ namespace TL
has_mute_until = 0x4,
/// Field has a value
has_sound = 0x8,
+ /// Field has a value
+ has_stories_muted = 0x40,
+ /// Field has a value
+ has_stories_hide_sender = 0x80,
+ /// Field has a value
+ has_stories_sound = 0x100,
}
}
/// Notification settings. See
- [TLDef(0xA83B0426)]
+ [TLDef(0x99622C0C)]
public class PeerNotifySettings : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -2706,6 +2746,11 @@ namespace TL
[IfFlag(4)] public NotificationSound android_sound;
/// Notification sound for other applications
[IfFlag(5)] public NotificationSound other_sound;
+ [IfFlag(6)] public bool stories_muted;
+ [IfFlag(7)] public bool stories_hide_sender;
+ [IfFlag(8)] public NotificationSound stories_ios_sound;
+ [IfFlag(9)] public NotificationSound stories_android_sound;
+ [IfFlag(10)] public NotificationSound stories_other_sound;
[Flags] public enum Flags : uint
{
@@ -2721,6 +2766,16 @@ namespace TL
has_android_sound = 0x10,
/// Field has a value
has_other_sound = 0x20,
+ /// Field has a value
+ has_stories_muted = 0x40,
+ /// Field has a value
+ has_stories_hide_sender = 0x80,
+ /// Field has a value
+ has_stories_ios_sound = 0x100,
+ /// Field has a value
+ has_stories_android_sound = 0x200,
+ /// Field has a value
+ has_stories_other_sound = 0x400,
}
}
@@ -2861,7 +2916,7 @@ namespace TL
}
/// Extended user info See
- [TLDef(0x93EADB53)]
+ [TLDef(0x4FE1CC86)]
public class UserFull : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -2902,6 +2957,7 @@ namespace TL
[IfFlag(19)] public PremiumGiftOption[] premium_gifts;
/// Wallpaper to use in the private chat with the user.
[IfFlag(24)] public WallPaperBase wallpaper;
+ [IfFlag(25)] public UserStories stories;
[Flags] public enum Flags : uint
{
@@ -2949,6 +3005,9 @@ namespace TL
translations_disabled = 0x800000,
/// Field has a value
has_wallpaper = 0x1000000,
+ /// Field has a value
+ has_stories = 0x2000000,
+ stories_pinned_available = 0x4000000,
}
}
@@ -4057,13 +4116,12 @@ namespace TL
[TLDef(0x564FE691)]
public class UpdateLoginToken : Update { }
/// A specific user has voted in a poll See
- [TLDef(0x106395C9)]
+ [TLDef(0x24F40E77)]
public class UpdateMessagePollVote : Update
{
/// Poll ID
public long poll_id;
- /// User ID
- public long user_id;
+ public Peer peer;
/// Chosen option(s)
public byte[][] options;
/// New qts value, see updates » for more info.
@@ -4558,6 +4616,27 @@ namespace TL
/// ID of the user we couldn't add.
public long user_id;
}
+ /// See
+ [TLDef(0x205A4133)]
+ public class UpdateStory : Update
+ {
+ public long user_id;
+ public StoryItemBase story;
+ }
+ /// See
+ [TLDef(0xFEB5345A)]
+ public class UpdateReadStories : Update
+ {
+ public long user_id;
+ public int max_id;
+ }
+ /// See
+ [TLDef(0x1BF335B9)]
+ public class UpdateStoryID : Update
+ {
+ public int id;
+ public long random_id;
+ }
/// Updates state. See
[TLDef(0xA56C2A3E)]
@@ -4702,7 +4781,7 @@ namespace TL
/// Info about the inline bot used to generate this message
[IfFlag(11)] public long via_bot_id;
/// Reply and thread information
- [IfFlag(3)] public MessageReplyHeader reply_to;
+ [IfFlag(3)] public MessageReplyHeaderBase reply_to;
/// Entities for styled text
[IfFlag(7)] public MessageEntity[] entities;
/// Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
@@ -4760,7 +4839,7 @@ namespace TL
/// Info about the inline bot used to generate this message
[IfFlag(11)] public long via_bot_id;
/// Reply (thread) information
- [IfFlag(3)] public MessageReplyHeader reply_to;
+ [IfFlag(3)] public MessageReplyHeaderBase reply_to;
/// Entities for styled text
[IfFlag(7)] public MessageEntity[] entities;
/// Time To Live of the message, once updateShortChatMessage.date+updateShortChatMessage.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
@@ -5694,6 +5773,8 @@ namespace TL
AddedByPhone = 0xD1219BDD,
///Whether people can send you voice messages
VoiceMessages = 0xAEE69D68,
+ ///See
+ About = 0x3823CC40,
}
/// Privacy key See
@@ -5717,6 +5798,8 @@ namespace TL
AddedByPhone = 0x42FFD42B,
///Whether the user accepts voice messages
VoiceMessages = 0x0697F414,
+ ///See
+ About = 0xA486B761,
}
/// Privacy rule See Derived classes: , , , , , , ,
@@ -5761,6 +5844,9 @@ namespace TL
/// Disallowed chat IDs
public long[] chats;
}
+ /// See
+ [TLDef(0x2F453E49)]
+ public class InputPrivacyValueAllowCloseFriends : InputPrivacyRule { }
/// Privacy rule See Derived classes: , , , , , , ,
public abstract class PrivacyRule : IObject { }
@@ -5804,6 +5890,9 @@ namespace TL
/// Disallowed chats
public long[] chats;
}
+ /// See
+ [TLDef(0xF7E8D89B)]
+ public class PrivacyValueAllowCloseFriends : PrivacyRule { }
/// Privacy rules See
[TLDef(0x50A04E45)]
@@ -5863,17 +5952,18 @@ namespace TL
}
}
/// Defines a video See
- [TLDef(0x0EF02CE6)]
+ [TLDef(0xD38FF1C2)]
public class DocumentAttributeVideo : DocumentAttribute
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// Duration in seconds
- public int duration;
+ public double duration;
/// Video width
public int w;
/// Video height
public int h;
+ [IfFlag(2)] public int preload_prefix_size;
[Flags] public enum Flags : uint
{
@@ -5881,6 +5971,9 @@ namespace TL
round_message = 0x1,
/// Whether the video supports streaming
supports_streaming = 0x2,
+ /// Field has a value
+ has_preload_prefix_size = 0x4,
+ nosound = 0x8,
}
}
/// Represents an audio file See
@@ -11471,7 +11564,7 @@ namespace TL
}
/// Results of poll See
- [TLDef(0xDCB82EA3)]
+ [TLDef(0x7ADF2420)]
public class PollResults : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -11481,7 +11574,7 @@ namespace TL
/// Total number of people that voted in the poll
[IfFlag(2)] public int total_voters;
/// IDs of the last users that recently voted in the poll
- [IfFlag(3)] public long[] recent_voters;
+ [IfFlag(3)] public Peer[] recent_voters;
/// Explanation of quiz solution
[IfFlag(4)] public string solution;
/// Message entities for styled text in quiz solution
@@ -11716,7 +11809,7 @@ namespace TL
}
/// Autodownload settings See
- [TLDef(0x8EFAB953)]
+ [TLDef(0xBAA57628)]
public class AutoDownloadSettings : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -11729,6 +11822,8 @@ namespace TL
public long file_size_max;
/// Maximum suggested bitrate for uploading videos
public int video_upload_maxbitrate;
+ public int small_queue_active_operations_max;
+ public int large_queue_active_operations_max;
[Flags] public enum Flags : uint
{
@@ -11740,6 +11835,7 @@ namespace TL
audio_preload_next = 0x4,
/// Whether to enable data saving mode in phone calls
phonecalls_less_data = 0x8,
+ stories_preload = 0x10,
}
}
@@ -12172,72 +12268,32 @@ namespace TL
has_settings = 0x2,
}
}
-
- /// How a user voted in a poll See Derived classes: , ,
- public abstract class MessageUserVoteBase : IObject
+ /// See
+ [TLDef(0x939A4671)]
+ public class WebPageAttributeStory : WebPageAttribute
{
- /// User ID
- public virtual long UserId { get; }
- /// When did the user cast the vote
- public virtual DateTime Date { get; }
- }
- /// How a user voted in a poll See
- [TLDef(0x34D247B4)]
- public class MessageUserVote : MessageUserVoteBase
- {
- /// User ID
+ public Flags flags;
public long user_id;
- /// The option chosen by the user
- public byte[] option;
- /// When did the user cast the vote
- public DateTime date;
+ public int id;
+ [IfFlag(0)] public StoryItemBase story;
- /// User ID
- public override long UserId => user_id;
- /// When did the user cast the vote
- public override DateTime Date => date;
- }
- /// How a user voted in a poll (reduced constructor, returned if an option was provided to Messages_GetPollVotes) See
- [TLDef(0x3CA5B0EC)]
- public class MessageUserVoteInputOption : MessageUserVoteBase
- {
- /// The user that voted for the queried option
- public long user_id;
- /// When did the user cast the vote
- public DateTime date;
-
- /// The user that voted for the queried option
- public override long UserId => user_id;
- /// When did the user cast the vote
- public override DateTime Date => date;
- }
- /// How a user voted in a multiple-choice poll See
- [TLDef(0x8A65E557)]
- public class MessageUserVoteMultiple : MessageUserVoteBase
- {
- /// User ID
- public long user_id;
- /// Options chosen by the user
- public byte[][] options;
- /// When did the user cast their votes
- public DateTime date;
-
- /// User ID
- public override long UserId => user_id;
- /// When did the user cast their votes
- public override DateTime Date => date;
+ [Flags] public enum Flags : uint
+ {
+ has_story = 0x1,
+ }
}
/// How users voted in a poll See
- [TLDef(0x0823F649)]
- public class Messages_VotesList : IObject
+ [TLDef(0x4899484E)]
+ public class Messages_VotesList : IObject, IPeerResolver
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// Total number of votes for all options (or only for the chosen option, if provided to Messages_GetPollVotes)
public int count;
/// Vote info for each user
- public MessageUserVoteBase[] votes;
+ public MessagePeerVoteBase[] votes;
+ public Dictionary chats;
/// Info about users that voted in the poll
public Dictionary users;
/// Offset to use with the next Messages_GetPollVotes request, empty string if no more results are available.
@@ -12248,6 +12304,8 @@ namespace TL
/// Field has a value
has_next_offset = 0x1,
}
+ /// returns a or for the given Peer
+ public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
}
/// Credit card info URL provided by the bank See
@@ -12660,18 +12718,18 @@ namespace TL
}
/// Global privacy settings See
- [TLDef(0xBEA2F424)]
+ [TLDef(0x734C4CCB)]
public class GlobalPrivacySettings : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
- /// Whether to archive and mute new chats from non-contacts
- [IfFlag(0)] public bool archive_and_mute_new_noncontact_peers;
[Flags] public enum Flags : uint
{
- /// Field has a value
- has_archive_and_mute_new_noncontact_peers = 0x1,
+ /// Whether to archive and mute new chats from non-contacts
+ archive_and_mute_new_noncontact_peers = 0x1,
+ keep_archived_unmuted = 0x2,
+ keep_archived_folders = 0x4,
}
}
@@ -12804,9 +12862,11 @@ namespace TL
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
}
+ /// Reply information See Derived classes:
+ public abstract class MessageReplyHeaderBase : IObject { }
/// Message replies and thread information See
[TLDef(0xA6D57763)]
- public class MessageReplyHeader : IObject
+ public class MessageReplyHeader : MessageReplyHeaderBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
@@ -12829,6 +12889,13 @@ namespace TL
forum_topic = 0x8,
}
}
+ /// See
+ [TLDef(0x9C98BFC1)]
+ public class MessageReplyStoryHeader : MessageReplyHeaderBase
+ {
+ public long user_id;
+ public int story_id;
+ }
/// Info about the comment section of a channel post, or a simple message thread See
[TLDef(0x83D60FC2)]
@@ -13370,7 +13437,7 @@ namespace TL
public class Account_ResetPasswordOk : Account_ResetPasswordResult { }
/// A sponsored message. See
- [TLDef(0xFC25B828)]
+ [TLDef(0xDAAFFF6B)]
public class SponsoredMessage : IObject
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -13387,6 +13454,7 @@ namespace TL
[IfFlag(2)] public int channel_post;
/// Parameter for the bot start message if the sponsored chat is a chat with a bot.
[IfFlag(0)] public string start_param;
+ [IfFlag(9)] public SponsoredWebPage webpage;
/// Sponsored message
public string message;
/// Message entities for styled text
@@ -13416,6 +13484,8 @@ namespace TL
has_sponsor_info = 0x80,
/// Field has a value
has_additional_info = 0x100,
+ /// Field has a value
+ has_webpage = 0x200,
}
}
@@ -13708,6 +13778,8 @@ namespace TL
big = 0x1,
/// Whether the reaction wasn't yet marked as read by the current user
unread = 0x2,
+ /// Starting from layer 159, Messages_SendReaction will send reactions from the peer (user or channel) specified using Messages_SaveDefaultSendAs.
If set, this flag indicates that this reaction was sent by us, even if the peer doesn't point to the current account.
+ my = 0x4,
}
}
@@ -14858,4 +14930,245 @@ namespace TL
/// Bot description
public string description;
}
+
+ /// See
+ public abstract class MessagePeerVoteBase : IObject
+ {
+ public virtual Peer Peer { get; }
+ public virtual DateTime Date { get; }
+ }
+ /// See
+ [TLDef(0xB6CC2D5C)]
+ public class MessagePeerVote : MessagePeerVoteBase
+ {
+ public Peer peer;
+ public byte[] option;
+ public DateTime date;
+
+ public override Peer Peer => peer;
+ public override DateTime Date => date;
+ }
+ /// See
+ [TLDef(0x74CDA504)]
+ public class MessagePeerVoteInputOption : MessagePeerVoteBase
+ {
+ public Peer peer;
+ public DateTime date;
+
+ public override Peer Peer => peer;
+ public override DateTime Date => date;
+ }
+ /// See
+ [TLDef(0x4628F6E6)]
+ public class MessagePeerVoteMultiple : MessagePeerVoteBase
+ {
+ public Peer peer;
+ public byte[][] options;
+ public DateTime date;
+
+ public override Peer Peer => peer;
+ public override DateTime Date => date;
+ }
+
+ /// See
+ [TLDef(0x3DB8EC63)]
+ public class SponsoredWebPage : IObject
+ {
+ public Flags flags;
+ public string url;
+ public string site_name;
+ [IfFlag(0)] public PhotoBase photo;
+
+ [Flags] public enum Flags : uint
+ {
+ has_photo = 0x1,
+ }
+ }
+
+ /// See
+ [TLDef(0xD36760CF)]
+ public class StoryViews : IObject
+ {
+ public Flags flags;
+ public int views_count;
+ [IfFlag(0)] public long[] recent_viewers;
+
+ [Flags] public enum Flags : uint
+ {
+ has_recent_viewers = 0x1,
+ }
+ }
+
+ /// See
+ public abstract class StoryItemBase : IObject
+ {
+ public virtual int ID { get; }
+ }
+ /// See
+ [TLDef(0x51E6EE4F)]
+ public class StoryItemDeleted : StoryItemBase
+ {
+ public int id;
+
+ public override int ID => id;
+ }
+ /// See
+ [TLDef(0xFFADC913)]
+ public class StoryItemSkipped : StoryItemBase
+ {
+ public Flags flags;
+ public int id;
+ public DateTime date;
+ public DateTime expire_date;
+
+ [Flags] public enum Flags : uint
+ {
+ close_friends = 0x100,
+ }
+
+ public override int ID => id;
+ }
+ /// See
+ [TLDef(0x562AA637)]
+ public class StoryItem : StoryItemBase
+ {
+ public Flags flags;
+ public int id;
+ public DateTime date;
+ public DateTime expire_date;
+ [IfFlag(0)] public string caption;
+ [IfFlag(1)] public MessageEntity[] entities;
+ public MessageMedia media;
+ [IfFlag(2)] public PrivacyRule[] privacy;
+ [IfFlag(3)] public StoryViews views;
+
+ [Flags] public enum Flags : uint
+ {
+ has_caption = 0x1,
+ has_entities = 0x2,
+ has_privacy = 0x4,
+ has_views = 0x8,
+ pinned = 0x20,
+ public_ = 0x80,
+ close_friends = 0x100,
+ min = 0x200,
+ noforwards = 0x400,
+ edited = 0x800,
+ contacts = 0x1000,
+ selected_contacts = 0x2000,
+ }
+
+ public override int ID => id;
+ }
+
+ /// See
+ [TLDef(0x8611A200)]
+ public class UserStories : IObject
+ {
+ public Flags flags;
+ public long user_id;
+ [IfFlag(0)] public int max_read_id;
+ public StoryItemBase[] stories;
+
+ [Flags] public enum Flags : uint
+ {
+ has_max_read_id = 0x1,
+ }
+ }
+
+ /// See
+ public abstract class Stories_AllStoriesBase : IObject { }
+ /// See
+ [TLDef(0x47E0A07E)]
+ public class Stories_AllStoriesNotModified : Stories_AllStoriesBase
+ {
+ public string state;
+ }
+ /// See
+ [TLDef(0x839E0428)]
+ public class Stories_AllStories : Stories_AllStoriesBase
+ {
+ public Flags flags;
+ public int count;
+ public string state;
+ public UserStories[] user_stories;
+ public Dictionary users;
+
+ [Flags] public enum Flags : uint
+ {
+ has_more = 0x1,
+ }
+ }
+
+ /// See
+ [TLDef(0x4FE57DF1)]
+ public class Stories_Stories : IObject
+ {
+ public int count;
+ public StoryItemBase[] stories;
+ public Dictionary users;
+ }
+
+ /// See
+ [TLDef(0x37A6FF5F)]
+ public class Stories_UserStories : IObject
+ {
+ public UserStories stories;
+ public Dictionary users;
+ }
+
+ /// See
+ [TLDef(0xA71AACC2)]
+ public class StoryView : IObject
+ {
+ public long user_id;
+ public DateTime date;
+ }
+
+ /// See
+ [TLDef(0xFB3F77AC)]
+ public class Stories_StoryViewsList : IObject
+ {
+ public int count;
+ public StoryView[] views;
+ public Dictionary users;
+ }
+
+ /// See
+ [TLDef(0xDE9EED1D)]
+ public class Stories_StoryViews : IObject
+ {
+ public StoryViews[] views;
+ public Dictionary users;
+ }
+
+ /// See
+ public abstract class InputReplyTo : IObject { }
+ /// See
+ [TLDef(0x9C5386E4)]
+ public class InputReplyToMessage : InputReplyTo
+ {
+ public Flags flags;
+ public int reply_to_msg_id;
+ [IfFlag(0)] public int top_msg_id;
+
+ [Flags] public enum Flags : uint
+ {
+ has_top_msg_id = 0x1,
+ }
+ }
+ /// See
+ [TLDef(0x15B0F283)]
+ public class InputReplyToStory : InputReplyTo
+ {
+ public InputUserBase user_id;
+ public int story_id;
+ }
+
+ /// See
+ [TLDef(0x3FC9053B)]
+ public class ExportedStoryLink : IObject
+ {
+ public string link;
+ }
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 73ca1c9..a8df2b4 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -759,10 +759,10 @@ namespace TL
/// Returns list of chats with non-default notification settings See
/// If true, chats with non-default sound will also be returned
/// If specified, only chats of the specified category will be returned
- public static Task Account_GetNotifyExceptions(this Client client, InputNotifyPeerBase peer = null, bool compare_sound = false)
+ public static Task Account_GetNotifyExceptions(this Client client, InputNotifyPeerBase peer = null, bool compare_sound = false, bool compare_stories = false)
=> client.Invoke(new Account_GetNotifyExceptions
{
- flags = (Account_GetNotifyExceptions.Flags)((peer != null ? 0x1 : 0) | (compare_sound ? 0x2 : 0)),
+ flags = (Account_GetNotifyExceptions.Flags)((peer != null ? 0x1 : 0) | (compare_sound ? 0x2 : 0) | (compare_stories ? 0x4 : 0)),
peer = peer,
});
@@ -1144,6 +1144,13 @@ namespace TL
{
});
+ /// See
+ public static Task Account_InvalidateSignInCodes(this Client client, params string[] codes)
+ => client.Invoke(new Account_InvalidateSignInCodes
+ {
+ codes = codes,
+ });
+
/// Returns basic user info according to their identifiers. See [bots: ✓] Possible codes: 400 (details)
/// List of user identifiers
public static Task Users_GetUsers(this Client client, params InputUserBase[] id)
@@ -1170,6 +1177,13 @@ namespace TL
errors = errors,
});
+ /// See
+ public static Task Users_GetStoriesMaxIDs(this Client client, params InputUserBase[] id)
+ => client.Invoke(new Users_GetStoriesMaxIDs
+ {
+ id = id,
+ });
+
/// Get contact by telegram IDs See
/// Hash for pagination, for more info click here
public static Task Contacts_GetContactIDs(this Client client, long hash = default)
@@ -1383,6 +1397,21 @@ namespace TL
token = token,
});
+ /// See
+ public static Task Contacts_EditCloseFriends(this Client client, params long[] id)
+ => client.Invoke(new Contacts_EditCloseFriends
+ {
+ id = id,
+ });
+
+ /// See
+ public static Task Contacts_ToggleStoriesHidden(this Client client, InputUserBase id, bool hidden)
+ => client.Invoke(new Contacts_ToggleStoriesHidden
+ {
+ id = id,
+ hidden = hidden,
+ });
+
/// ⚠ This method is only for basic Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Returns the list of messages by their IDs. See [bots: ✓]
/// Message ID list
public static Task Messages_GetMessages(this Client client, params InputMessage[] id)
@@ -1532,21 +1561,18 @@ namespace TL
/// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled
/// Whether to move used stickersets to top, see here for more info on this flag »
/// The destination where the message will be sent
- /// The message ID to which this message will reply to
- /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// The message
/// Unique client message ID required to prevent message resending You can use
/// Reply markup for sending bot buttons
/// Message entities for sending styled text
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
- public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
+ public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
=> client.Invoke(new Messages_SendMessage
{
- flags = (Messages_SendMessage.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
+ flags = (Messages_SendMessage.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (no_webpage ? 0x2 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
peer = peer,
- reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(),
- top_msg_id = top_msg_id.GetValueOrDefault(),
+ reply_to = reply_to,
message = message,
random_id = random_id,
reply_markup = reply_markup,
@@ -1562,8 +1588,6 @@ namespace TL
/// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled
/// Whether to move used stickersets to top, see here for more info on this flag »
/// Destination
- /// Message ID to which this message should reply to
- /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// Attached media
/// Caption
/// Random ID to avoid resending the same message You can use
@@ -1571,13 +1595,12 @@ namespace TL
/// Message entities for styled text
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
- public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
+ public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, InputReplyTo reply_to = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
=> client.Invoke(new Messages_SendMedia
{
- flags = (Messages_SendMedia.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
+ flags = (Messages_SendMedia.Flags)((reply_to != null ? 0x1 : 0) | (reply_markup != null ? 0x4 : 0) | (entities != null ? 0x8 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
peer = peer,
- reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(),
- top_msg_id = top_msg_id.GetValueOrDefault(),
+ reply_to = reply_to,
media = media,
message = message,
random_id = random_id,
@@ -2098,20 +2121,17 @@ namespace TL
/// Whether to clear the draft
/// Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the )
/// Destination
- /// ID of the message this message should reply to
- /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// Random ID to avoid resending the same query You can use
/// Query ID from Messages_GetInlineBotResults
/// Result ID from Messages_GetInlineBotResults
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
- public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, int? reply_to_msg_id = null, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false)
+ public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, InputReplyTo reply_to = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false)
=> client.Invoke(new Messages_SendInlineBotResult
{
- flags = (Messages_SendInlineBotResult.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (hide_via ? 0x800 : 0)),
+ flags = (Messages_SendInlineBotResult.Flags)((reply_to != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (hide_via ? 0x800 : 0)),
peer = peer,
- reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(),
- top_msg_id = top_msg_id.GetValueOrDefault(),
+ reply_to = reply_to,
random_id = random_id,
query_id = query_id,
id = id,
@@ -2376,13 +2396,6 @@ namespace TL
limit = limit,
});
- /// See
- public static Task Messages_GetAllChats(this Client client, long[] except_ids = null)
- => client.Invoke(new Messages_GetAllChats
- {
- except_ids = except_ids,
- });
-
/// Get instant view page See Possible codes: 400 (details)
/// URL of IV page to fetch
/// Hash for pagination, for more info click here
@@ -2461,13 +2474,12 @@ namespace TL
/// Notify the other user in a private chat that a screenshot of the chat was taken See Possible codes: 400 (details)
/// Other user
- /// ID of message that was screenshotted, can be 0
/// Random ID to avoid message resending You can use
- public static Task Messages_SendScreenshotNotification(this Client client, InputPeer peer, int reply_to_msg_id, long random_id)
+ public static Task Messages_SendScreenshotNotification(this Client client, InputPeer peer, InputReplyTo reply_to, long random_id)
=> client.Invoke(new Messages_SendScreenshotNotification
{
peer = peer,
- reply_to_msg_id = reply_to_msg_id,
+ reply_to = reply_to,
random_id = random_id,
});
@@ -2541,18 +2553,15 @@ namespace TL
/// Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled
/// Whether to move used stickersets to top, see here for more info on this flag »
/// The destination chat
- /// The message to reply to
- /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// The medias to send: note that they must be separately uploaded using Messages_UploadMedia first, using raw inputMediaUploaded* constructors is not supported.
/// Scheduled message date for scheduled messages
/// Send this message as the specified peer
- public static Task Messages_SendMultiMedia(this Client client, InputPeer peer, InputSingleMedia[] multi_media, int? reply_to_msg_id = null, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
+ public static Task Messages_SendMultiMedia(this Client client, InputPeer peer, InputSingleMedia[] multi_media, InputReplyTo reply_to = null, DateTime? schedule_date = null, InputPeer send_as = null, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, bool update_stickersets_order = false)
=> client.Invoke(new Messages_SendMultiMedia
{
- flags = (Messages_SendMultiMedia.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
+ flags = (Messages_SendMultiMedia.Flags)((reply_to != null ? 0x1 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (clear_draft ? 0x80 : 0) | (noforwards ? 0x4000 : 0) | (update_stickersets_order ? 0x8000 : 0)),
peer = peer,
- reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(),
- top_msg_id = top_msg_id.GetValueOrDefault(),
+ reply_to = reply_to,
multi_media = multi_media,
schedule_date = schedule_date.GetValueOrDefault(),
send_as = send_as,
@@ -3364,21 +3373,18 @@ namespace TL
/// If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter.
/// Theme parameters »
/// Short name of the application; 0-64 English letters, digits, and underscores
- /// Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage should be sent in reply to this message ID.
- /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// Open the web app as the specified peer, sending the resulting the message as the specified peer.
- public static Task Messages_RequestWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, int? reply_to_msg_id = null, string url = null, DataJSON theme_params = null, string start_param = null, int? top_msg_id = null, InputPeer send_as = null, bool from_bot_menu = false, bool silent = false)
+ public static Task Messages_RequestWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, InputReplyTo reply_to = null, string url = null, DataJSON theme_params = null, string start_param = null, InputPeer send_as = null, bool from_bot_menu = false, bool silent = false)
=> client.Invoke(new Messages_RequestWebView
{
- flags = (Messages_RequestWebView.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (url != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (start_param != null ? 0x8 : 0) | (top_msg_id != null ? 0x200 : 0) | (send_as != null ? 0x2000 : 0) | (from_bot_menu ? 0x10 : 0) | (silent ? 0x20 : 0)),
+ flags = (Messages_RequestWebView.Flags)((reply_to != null ? 0x1 : 0) | (url != null ? 0x2 : 0) | (theme_params != null ? 0x4 : 0) | (start_param != null ? 0x8 : 0) | (send_as != null ? 0x2000 : 0) | (from_bot_menu ? 0x10 : 0) | (silent ? 0x20 : 0)),
peer = peer,
bot = bot,
url = url,
start_param = start_param,
theme_params = theme_params,
platform = platform,
- reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(),
- top_msg_id = top_msg_id.GetValueOrDefault(),
+ reply_to = reply_to,
send_as = send_as,
});
@@ -3387,18 +3393,15 @@ namespace TL
/// Dialog where the web app was opened.
/// Bot that owns the web app
/// Web app interaction ID obtained from Messages_RequestWebView
- /// Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage should be sent in reply to this message ID.
- /// This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic.
/// Open the web app as the specified peer
- public static Task Messages_ProlongWebView(this Client client, InputPeer peer, InputUserBase bot, long query_id, int? reply_to_msg_id = null, int? top_msg_id = null, InputPeer send_as = null, bool silent = false)
+ public static Task Messages_ProlongWebView(this Client client, InputPeer peer, InputUserBase bot, long query_id, InputReplyTo reply_to = null, InputPeer send_as = null, bool silent = false)
=> client.Invoke(new Messages_ProlongWebView
{
- flags = (Messages_ProlongWebView.Flags)((reply_to_msg_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x200 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0)),
+ flags = (Messages_ProlongWebView.Flags)((reply_to != null ? 0x1 : 0) | (send_as != null ? 0x2000 : 0) | (silent ? 0x20 : 0)),
peer = peer,
bot = bot,
query_id = query_id,
- reply_to_msg_id = reply_to_msg_id.GetValueOrDefault(),
- top_msg_id = top_msg_id.GetValueOrDefault(),
+ reply_to = reply_to,
send_as = send_as,
});
@@ -3671,14 +3674,16 @@ namespace TL
/// For fast updating: if provided and pts + pts_total_limit < remote pts, will be returned.
Simply tells the server to not return the difference if it is bigger than pts_total_limit
If the remote pts is too big (> ~4000000), this field will default to 1000000
/// date, see updates.
/// QTS, see updates.
- public static Task Updates_GetDifference(this Client client, int pts, DateTime date, int qts, int? pts_total_limit = null)
+ public static Task Updates_GetDifference(this Client client, int pts, DateTime date, int qts, int? pts_total_limit = null, int? pts_limit = null, int? qts_limit = null)
=> client.Invoke(new Updates_GetDifference
{
- flags = (Updates_GetDifference.Flags)(pts_total_limit != null ? 0x1 : 0),
+ flags = (Updates_GetDifference.Flags)((pts_total_limit != null ? 0x1 : 0) | (pts_limit != null ? 0x2 : 0) | (qts_limit != null ? 0x4 : 0)),
pts = pts,
+ pts_limit = pts_limit.GetValueOrDefault(),
pts_total_limit = pts_total_limit.GetValueOrDefault(),
date = date,
qts = qts,
+ qts_limit = qts_limit.GetValueOrDefault(),
});
/// Returns the difference between the current state of updates of a certain channel and transmitted. See [bots: ✓] Possible codes: 400,403,406,500 (details)
@@ -4647,6 +4652,14 @@ namespace TL
enabled = enabled,
});
+ /// See
+ public static Task Channels_ClickSponsoredMessage(this Client client, InputChannelBase channel, byte[] random_id)
+ => client.Invoke(new Channels_ClickSponsoredMessage
+ {
+ channel = channel,
+ random_id = random_id,
+ });
+
/// Sends a custom request; for bots only See [bots: ✓] Possible codes: 400,403 (details)
/// The method name
/// JSON-serialized method parameters
@@ -5598,6 +5611,150 @@ namespace TL
chatlist = chatlist,
peers = peers,
});
+
+ /// See
+ public static Task Stories_SendStory(this Client client, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, bool pinned = false, bool noforwards = false)
+ => client.Invoke(new Stories_SendStory
+ {
+ flags = (Stories_SendStory.Flags)((caption != null ? 0x1 : 0) | (entities != null ? 0x2 : 0) | (period != null ? 0x8 : 0) | (pinned ? 0x4 : 0) | (noforwards ? 0x10 : 0)),
+ media = media,
+ caption = caption,
+ entities = entities,
+ privacy_rules = privacy_rules,
+ random_id = random_id,
+ period = period.GetValueOrDefault(),
+ });
+
+ /// See
+ public static Task Stories_EditStory(this Client client, int id, InputMedia media = null, string caption = null, MessageEntity[] entities = null, InputPrivacyRule[] privacy_rules = null)
+ => client.Invoke(new Stories_EditStory
+ {
+ flags = (Stories_EditStory.Flags)((media != null ? 0x1 : 0) | (caption != null ? 0x2 : 0) | (entities != null ? 0x2 : 0) | (privacy_rules != null ? 0x4 : 0)),
+ id = id,
+ media = media,
+ caption = caption,
+ entities = entities,
+ privacy_rules = privacy_rules,
+ });
+
+ /// See
+ public static Task Stories_DeleteStories(this Client client, params int[] id)
+ => client.Invoke(new Stories_DeleteStories
+ {
+ id = id,
+ });
+
+ /// See
+ public static Task Stories_TogglePinned(this Client client, int[] id, bool pinned)
+ => client.Invoke(new Stories_TogglePinned
+ {
+ id = id,
+ pinned = pinned,
+ });
+
+ /// See
+ public static Task Stories_GetAllStories(this Client client, string state = null, bool next = false, bool hidden = false)
+ => client.Invoke(new Stories_GetAllStories
+ {
+ flags = (Stories_GetAllStories.Flags)((state != null ? 0x1 : 0) | (next ? 0x2 : 0) | (hidden ? 0x4 : 0)),
+ state = state,
+ });
+
+ /// See
+ public static Task Stories_GetUserStories(this Client client, InputUserBase user_id)
+ => client.Invoke(new Stories_GetUserStories
+ {
+ user_id = user_id,
+ });
+
+ /// See
+ public static Task Stories_GetPinnedStories(this Client client, InputUserBase user_id, int offset_id = default, int limit = int.MaxValue)
+ => client.Invoke(new Stories_GetPinnedStories
+ {
+ user_id = user_id,
+ offset_id = offset_id,
+ limit = limit,
+ });
+
+ /// See
+ public static Task Stories_GetStoriesArchive(this Client client, int offset_id = default, int limit = int.MaxValue)
+ => client.Invoke(new Stories_GetStoriesArchive
+ {
+ offset_id = offset_id,
+ limit = limit,
+ });
+
+ /// See
+ public static Task Stories_GetStoriesByID(this Client client, InputUserBase user_id, params int[] id)
+ => client.Invoke(new Stories_GetStoriesByID
+ {
+ user_id = user_id,
+ id = id,
+ });
+
+ /// See
+ public static Task Stories_ToggleAllStoriesHidden(this Client client, bool hidden)
+ => client.Invoke(new Stories_ToggleAllStoriesHidden
+ {
+ hidden = hidden,
+ });
+
+ /// See
+ public static Task Stories_GetAllReadUserStories(this Client client)
+ => client.Invoke(new Stories_GetAllReadUserStories
+ {
+ });
+
+ /// See
+ public static Task Stories_ReadStories(this Client client, InputUserBase user_id, int max_id = default)
+ => client.Invoke(new Stories_ReadStories
+ {
+ user_id = user_id,
+ max_id = max_id,
+ });
+
+ /// See
+ public static Task Stories_IncrementStoryViews(this Client client, InputUserBase user_id, params int[] id)
+ => client.Invoke(new Stories_IncrementStoryViews
+ {
+ user_id = user_id,
+ id = id,
+ });
+
+ /// See
+ public static Task Stories_GetStoryViewsList(this Client client, int id, DateTime offset_date = default, long offset_id = default, int limit = int.MaxValue)
+ => client.Invoke(new Stories_GetStoryViewsList
+ {
+ id = id,
+ offset_date = offset_date,
+ offset_id = offset_id,
+ limit = limit,
+ });
+
+ /// See
+ public static Task Stories_GetStoriesViews(this Client client, params int[] id)
+ => client.Invoke(new Stories_GetStoriesViews
+ {
+ id = id,
+ });
+
+ /// See
+ public static Task Stories_ExportStoryLink(this Client client, InputUserBase user_id, int id)
+ => client.Invoke(new Stories_ExportStoryLink
+ {
+ user_id = user_id,
+ id = id,
+ });
+
+ /// See
+ public static Task Stories_Report(this Client client, InputUserBase user_id, int[] id, ReportReason reason, string message)
+ => client.Invoke(new Stories_Report
+ {
+ user_id = user_id,
+ id = id,
+ reason = reason,
+ message = message,
+ });
}
}
@@ -6167,6 +6324,7 @@ namespace TL.Methods
{
has_peer = 0x1,
compare_sound = 0x2,
+ compare_stories = 0x4,
}
}
@@ -6473,6 +6631,12 @@ namespace TL.Methods
[TLDef(0x53BC0020)]
public class Account_DeleteAutoSaveExceptions : IMethod { }
+ [TLDef(0xCA8AE8BA)]
+ public class Account_InvalidateSignInCodes : IMethod
+ {
+ public string[] codes;
+ }
+
[TLDef(0x0D91A548)]
public class Users_GetUsers : IMethod
{
@@ -6492,6 +6656,12 @@ namespace TL.Methods
public SecureValueErrorBase[] errors;
}
+ [TLDef(0xCA1CB9AB)]
+ public class Users_GetStoriesMaxIDs : IMethod
+ {
+ public InputUserBase[] id;
+ }
+
[TLDef(0x7ADC669D)]
public class Contacts_GetContactIDs : IMethod
{
@@ -6661,6 +6831,19 @@ namespace TL.Methods
public string token;
}
+ [TLDef(0xBA6705F0)]
+ public class Contacts_EditCloseFriends : IMethod
+ {
+ public long[] id;
+ }
+
+ [TLDef(0x753FB865)]
+ public class Contacts_ToggleStoriesHidden : IMethod
+ {
+ public InputUserBase id;
+ public bool hidden;
+ }
+
[TLDef(0x63C66506)]
public class Messages_GetMessages : IMethod
{
@@ -6780,13 +6963,12 @@ namespace TL.Methods
}
}
- [TLDef(0x1CC20387)]
+ [TLDef(0x280D096F)]
public class Messages_SendMessage : IMethod
{
public Flags flags;
public InputPeer peer;
- [IfFlag(0)] public int reply_to_msg_id;
- [IfFlag(9)] public int top_msg_id;
+ [IfFlag(0)] public InputReplyTo reply_to;
public string message;
public long random_id;
[IfFlag(2)] public ReplyMarkup reply_markup;
@@ -6796,14 +6978,13 @@ namespace TL.Methods
[Flags] public enum Flags : uint
{
- has_reply_to_msg_id = 0x1,
+ has_reply_to = 0x1,
no_webpage = 0x2,
has_reply_markup = 0x4,
has_entities = 0x8,
silent = 0x20,
background = 0x40,
clear_draft = 0x80,
- has_top_msg_id = 0x200,
has_schedule_date = 0x400,
has_send_as = 0x2000,
noforwards = 0x4000,
@@ -6811,13 +6992,12 @@ namespace TL.Methods
}
}
- [TLDef(0x7547C966)]
+ [TLDef(0x72CCC23D)]
public class Messages_SendMedia : IMethod
{
public Flags flags;
public InputPeer peer;
- [IfFlag(0)] public int reply_to_msg_id;
- [IfFlag(9)] public int top_msg_id;
+ [IfFlag(0)] public InputReplyTo reply_to;
public InputMedia media;
public string message;
public long random_id;
@@ -6828,13 +7008,12 @@ namespace TL.Methods
[Flags] public enum Flags : uint
{
- has_reply_to_msg_id = 0x1,
+ has_reply_to = 0x1,
has_reply_markup = 0x4,
has_entities = 0x8,
silent = 0x20,
background = 0x40,
clear_draft = 0x80,
- has_top_msg_id = 0x200,
has_schedule_date = 0x400,
has_send_as = 0x2000,
noforwards = 0x4000,
@@ -7253,13 +7432,12 @@ namespace TL.Methods
}
}
- [TLDef(0xD3FBDCCB)]
+ [TLDef(0xF7BC68BA)]
public class Messages_SendInlineBotResult : IMethod
{
public Flags flags;
public InputPeer peer;
- [IfFlag(0)] public int reply_to_msg_id;
- [IfFlag(9)] public int top_msg_id;
+ [IfFlag(0)] public InputReplyTo reply_to;
public long random_id;
public long query_id;
public string id;
@@ -7268,11 +7446,10 @@ namespace TL.Methods
[Flags] public enum Flags : uint
{
- has_reply_to_msg_id = 0x1,
+ has_reply_to = 0x1,
silent = 0x20,
background = 0x40,
clear_draft = 0x80,
- has_top_msg_id = 0x200,
has_schedule_date = 0x400,
hide_via = 0x800,
has_send_as = 0x2000,
@@ -7519,12 +7696,6 @@ namespace TL.Methods
public int limit;
}
- [TLDef(0x875F74BE)]
- public class Messages_GetAllChats : IMethod
- {
- public long[] except_ids;
- }
-
[TLDef(0x32CA8F91)]
public class Messages_GetWebPage : IMethod
{
@@ -7599,11 +7770,11 @@ namespace TL.Methods
public InputMedia media;
}
- [TLDef(0xC97DF020)]
+ [TLDef(0xA1405817)]
public class Messages_SendScreenshotNotification : IMethod
{
public InputPeer peer;
- public int reply_to_msg_id;
+ public InputReplyTo reply_to;
public long random_id;
}
@@ -7659,24 +7830,22 @@ namespace TL.Methods
public long hash;
}
- [TLDef(0xB6F11A1C)]
+ [TLDef(0x456E8987)]
public class Messages_SendMultiMedia : IMethod
{
public Flags flags;
public InputPeer peer;
- [IfFlag(0)] public int reply_to_msg_id;
- [IfFlag(9)] public int top_msg_id;
+ [IfFlag(0)] public InputReplyTo reply_to;
public InputSingleMedia[] multi_media;
[IfFlag(10)] public DateTime schedule_date;
[IfFlag(13)] public InputPeer send_as;
[Flags] public enum Flags : uint
{
- has_reply_to_msg_id = 0x1,
+ has_reply_to = 0x1,
silent = 0x20,
background = 0x40,
clear_draft = 0x80,
- has_top_msg_id = 0x200,
has_schedule_date = 0x400,
has_send_as = 0x2000,
noforwards = 0x4000,
@@ -8343,7 +8512,7 @@ namespace TL.Methods
}
}
- [TLDef(0x178B480B)]
+ [TLDef(0x269DC2C1)]
public class Messages_RequestWebView : IMethod
{
public Flags flags;
@@ -8353,39 +8522,35 @@ namespace TL.Methods
[IfFlag(3)] public string start_param;
[IfFlag(2)] public DataJSON theme_params;
public string platform;
- [IfFlag(0)] public int reply_to_msg_id;
- [IfFlag(9)] public int top_msg_id;
+ [IfFlag(0)] public InputReplyTo reply_to;
[IfFlag(13)] public InputPeer send_as;
[Flags] public enum Flags : uint
{
- has_reply_to_msg_id = 0x1,
+ has_reply_to = 0x1,
has_url = 0x2,
has_theme_params = 0x4,
has_start_param = 0x8,
from_bot_menu = 0x10,
silent = 0x20,
- has_top_msg_id = 0x200,
has_send_as = 0x2000,
}
}
- [TLDef(0x7FF34309)]
+ [TLDef(0xB0D81A83)]
public class Messages_ProlongWebView : IMethod
{
public Flags flags;
public InputPeer peer;
public InputUserBase bot;
public long query_id;
- [IfFlag(0)] public int reply_to_msg_id;
- [IfFlag(9)] public int top_msg_id;
+ [IfFlag(0)] public InputReplyTo reply_to;
[IfFlag(13)] public InputPeer send_as;
[Flags] public enum Flags : uint
{
- has_reply_to_msg_id = 0x1,
+ has_reply_to = 0x1,
silent = 0x20,
- has_top_msg_id = 0x200,
has_send_as = 0x2000,
}
}
@@ -8588,18 +8753,22 @@ namespace TL.Methods
[TLDef(0xEDD4882A)]
public class Updates_GetState : IMethod { }
- [TLDef(0x25939651)]
+ [TLDef(0x19C2F763)]
public class Updates_GetDifference : IMethod
{
public Flags flags;
public int pts;
+ [IfFlag(1)] public int pts_limit;
[IfFlag(0)] public int pts_total_limit;
public DateTime date;
public int qts;
+ [IfFlag(2)] public int qts_limit;
[Flags] public enum Flags : uint
{
has_pts_total_limit = 0x1,
+ has_pts_limit = 0x2,
+ has_qts_limit = 0x4,
}
}
@@ -9337,6 +9506,13 @@ namespace TL.Methods
public bool enabled;
}
+ [TLDef(0x18AFBC93)]
+ public class Channels_ClickSponsoredMessage : IMethod
+ {
+ public InputChannelBase channel;
+ public byte[] random_id;
+ }
+
[TLDef(0xAA2769ED)]
public class Bots_SendCustomRequest : IMethod
{
@@ -10122,4 +10298,152 @@ namespace TL.Methods
public InputChatlist chatlist;
public InputPeer[] peers;
}
+
+ [TLDef(0x424CD47A)]
+ public class Stories_SendStory : IMethod
+ {
+ public Flags flags;
+ public InputMedia media;
+ [IfFlag(0)] public string caption;
+ [IfFlag(1)] public MessageEntity[] entities;
+ public InputPrivacyRule[] privacy_rules;
+ public long random_id;
+ [IfFlag(3)] public int period;
+
+ [Flags] public enum Flags : uint
+ {
+ has_caption = 0x1,
+ has_entities = 0x2,
+ pinned = 0x4,
+ has_period = 0x8,
+ noforwards = 0x10,
+ }
+ }
+
+ [TLDef(0x2AAE7A41)]
+ public class Stories_EditStory : IMethod
+ {
+ public Flags flags;
+ public int id;
+ [IfFlag(0)] public InputMedia media;
+ [IfFlag(1)] public string caption;
+ [IfFlag(1)] public MessageEntity[] entities;
+ [IfFlag(2)] public InputPrivacyRule[] privacy_rules;
+
+ [Flags] public enum Flags : uint
+ {
+ has_media = 0x1,
+ has_caption = 0x2,
+ has_privacy_rules = 0x4,
+ }
+ }
+
+ [TLDef(0xB5D501D7)]
+ public class Stories_DeleteStories : IMethod
+ {
+ public int[] id;
+ }
+
+ [TLDef(0x51602944)]
+ public class Stories_TogglePinned : IMethod
+ {
+ public int[] id;
+ public bool pinned;
+ }
+
+ [TLDef(0xEEB0D625)]
+ public class Stories_GetAllStories : IMethod
+ {
+ public Flags flags;
+ [IfFlag(0)] public string state;
+
+ [Flags] public enum Flags : uint
+ {
+ has_state = 0x1,
+ next = 0x2,
+ hidden = 0x4,
+ }
+ }
+
+ [TLDef(0x96D528E0)]
+ public class Stories_GetUserStories : IMethod
+ {
+ public InputUserBase user_id;
+ }
+
+ [TLDef(0x0B471137)]
+ public class Stories_GetPinnedStories : IMethod
+ {
+ public InputUserBase user_id;
+ public int offset_id;
+ public int limit;
+ }
+
+ [TLDef(0x1F5BC5D2)]
+ public class Stories_GetStoriesArchive : IMethod
+ {
+ public int offset_id;
+ public int limit;
+ }
+
+ [TLDef(0x6A15CF46)]
+ public class Stories_GetStoriesByID : IMethod
+ {
+ public InputUserBase user_id;
+ public int[] id;
+ }
+
+ [TLDef(0x7C2557C4)]
+ public class Stories_ToggleAllStoriesHidden : IMethod
+ {
+ public bool hidden;
+ }
+
+ [TLDef(0x729C562C)]
+ public class Stories_GetAllReadUserStories : IMethod { }
+
+ [TLDef(0xEDC5105B)]
+ public class Stories_ReadStories : IMethod
+ {
+ public InputUserBase user_id;
+ public int max_id;
+ }
+
+ [TLDef(0x22126127)]
+ public class Stories_IncrementStoryViews : IMethod
+ {
+ public InputUserBase user_id;
+ public int[] id;
+ }
+
+ [TLDef(0x4B3B5E97)]
+ public class Stories_GetStoryViewsList : IMethod
+ {
+ public int id;
+ public DateTime offset_date;
+ public long offset_id;
+ public int limit;
+ }
+
+ [TLDef(0x9A75D6A6)]
+ public class Stories_GetStoriesViews : IMethod
+ {
+ public int[] id;
+ }
+
+ [TLDef(0x16E443CE)]
+ public class Stories_ExportStoryLink : IMethod
+ {
+ public InputUserBase user_id;
+ public int id;
+ }
+
+ [TLDef(0xC95BE06A)]
+ public class Stories_Report : IMethod
+ {
+ public InputUserBase user_id;
+ public int[] id;
+ public ReportReason reason;
+ public string message;
+ }
}
diff --git a/src/TL.Secret.cs b/src/TL.Secret.cs
index 6ab716a..effd431 100644
--- a/src/TL.Secret.cs
+++ b/src/TL.Secret.cs
@@ -740,6 +740,26 @@ namespace TL
/// User is uploading a round video See
[TLDef(0xBB718624)]
public class SendMessageUploadRoundAction : SendMessageAction { }
+
+ /// Defines a video See
+ [TLDef(0x0EF02CE6)]
+ public class DocumentAttributeVideo : DocumentAttribute
+ {
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
+ public Flags flags;
+ /// Duration in seconds
+ public int duration;
+ /// Video width
+ public int w;
+ /// Video height
+ public int h;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Whether this is a round video
+ round_message = 0x1,
+ }
+ }
}
namespace Layer73
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index 441228b..0ffcd41 100644
--- a/src/TL.Table.cs
+++ b/src/TL.Table.cs
@@ -6,7 +6,7 @@ namespace TL
{
public static class Layer
{
- public const int Version = 158; // fetched 21/04/2023 14:33:19
+ public const int Version = 160; // fetched 21/07/2023 07:55:22
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -98,6 +98,7 @@ namespace TL
[0x971FA843] = typeof(InputMediaGeoLive),
[0x0F94E5F1] = typeof(InputMediaPoll),
[0xE66FBF7B] = typeof(InputMediaDice),
+ [0x9A86B58F] = typeof(InputMediaStory),
[0x1CA48F57] = null,//InputChatPhotoEmpty
[0xBDCDAEC0] = typeof(InputChatUploadedPhoto),
[0x8953AD37] = typeof(InputChatPhoto),
@@ -119,7 +120,7 @@ namespace TL
[0x36C6019A] = typeof(PeerChat),
[0xA2A5371E] = typeof(PeerChannel),
[0xD3BC4B7A] = typeof(UserEmpty),
- [0x8F97C628] = typeof(User),
+ [0xABB5F120] = typeof(User),
[0x4F11BAE1] = null,//UserProfilePhotoEmpty
[0x82D1F706] = typeof(UserProfilePhoto),
[0x09D05049] = null,//UserStatusEmpty
@@ -150,7 +151,7 @@ namespace TL
[0x56E0D474] = typeof(MessageMediaGeo),
[0x70322949] = typeof(MessageMediaContact),
[0x9F84F49E] = typeof(MessageMediaUnsupported),
- [0x9CB070D7] = typeof(MessageMediaDocument),
+ [0x4CF4D72D] = typeof(MessageMediaDocument),
[0xA32DD600] = typeof(MessageMediaWebPage),
[0x2EC0533F] = typeof(MessageMediaVenue),
[0xFDB19008] = typeof(MessageMediaGame),
@@ -158,6 +159,7 @@ namespace TL
[0xB940C666] = typeof(MessageMediaGeoLive),
[0x4BD6E798] = typeof(MessageMediaPoll),
[0x3F7EE58B] = typeof(MessageMediaDice),
+ [0xCBB20D88] = typeof(MessageMediaStory),
[0xB6AEF7B0] = null,//MessageActionEmpty
[0xBD47CBAD] = typeof(MessageActionChatCreate),
[0xB5A1CE5A] = typeof(MessageActionChatEditTitle),
@@ -219,12 +221,12 @@ namespace TL
[0x4A95E84E] = typeof(InputNotifyChats),
[0xB1DB7C7E] = typeof(InputNotifyBroadcasts),
[0x5C467992] = typeof(InputNotifyForumTopic),
- [0xDF1F002B] = typeof(InputPeerNotifySettings),
- [0xA83B0426] = typeof(PeerNotifySettings),
+ [0xCACB6AE2] = typeof(InputPeerNotifySettings),
+ [0x99622C0C] = typeof(PeerNotifySettings),
[0xA518110D] = typeof(PeerSettings),
[0xA437C3ED] = typeof(WallPaper),
[0xE0804116] = typeof(WallPaperNoFile),
- [0x93EADB53] = typeof(UserFull),
+ [0x4FE1CC86] = typeof(UserFull),
[0x145ADE0B] = typeof(Contact),
[0xC13E3C50] = typeof(ImportedContact),
[0x16D9703B] = typeof(ContactStatus),
@@ -332,7 +334,7 @@ namespace TL
[0x8216FBA3] = typeof(UpdateTheme),
[0x871FB939] = typeof(UpdateGeoLiveViewed),
[0x564FE691] = typeof(UpdateLoginToken),
- [0x106395C9] = typeof(UpdateMessagePollVote),
+ [0x24F40E77] = typeof(UpdateMessagePollVote),
[0x26FFDE7D] = typeof(UpdateDialogFilter),
[0xA5D72105] = typeof(UpdateDialogFilterOrder),
[0x3504914F] = typeof(UpdateDialogFilters),
@@ -372,6 +374,9 @@ namespace TL
[0x20529438] = typeof(UpdateUser),
[0xEC05B097] = typeof(UpdateAutoSaveSettings),
[0xCCF08AD6] = typeof(UpdateGroupInvitePrivacyForbidden),
+ [0x205A4133] = typeof(UpdateStory),
+ [0xFEB5345A] = typeof(UpdateReadStories),
+ [0x1BF335B9] = typeof(UpdateStoryID),
[0xA56C2A3E] = typeof(Updates_State),
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
[0x00F49CA0] = typeof(Updates_Difference),
@@ -450,6 +455,7 @@ namespace TL
[0x90110467] = typeof(InputPrivacyValueDisallowUsers),
[0x840649CF] = typeof(InputPrivacyValueAllowChatParticipants),
[0xE94F0F86] = typeof(InputPrivacyValueDisallowChatParticipants),
+ [0x2F453E49] = typeof(InputPrivacyValueAllowCloseFriends),
[0xFFFE1BAC] = typeof(PrivacyValueAllowContacts),
[0x65427B82] = typeof(PrivacyValueAllowAll),
[0xB8905FB2] = typeof(PrivacyValueAllowUsers),
@@ -458,12 +464,13 @@ namespace TL
[0xE4621141] = typeof(PrivacyValueDisallowUsers),
[0x6B134E8E] = typeof(PrivacyValueAllowChatParticipants),
[0x41C87565] = typeof(PrivacyValueDisallowChatParticipants),
+ [0xF7E8D89B] = typeof(PrivacyValueAllowCloseFriends),
[0x50A04E45] = typeof(Account_PrivacyRules),
[0xB8D0AFDF] = typeof(AccountDaysTTL),
[0x6C37C15C] = typeof(DocumentAttributeImageSize),
[0x11B58939] = typeof(DocumentAttributeAnimated),
[0x6319D612] = typeof(DocumentAttributeSticker),
- [0x0EF02CE6] = typeof(DocumentAttributeVideo),
+ [0xD38FF1C2] = typeof(DocumentAttributeVideo),
[0x9852F9C6] = typeof(DocumentAttributeAudio),
[0x15590068] = typeof(DocumentAttributeFilename),
[0x9801D2F7] = typeof(DocumentAttributeHasStickers),
@@ -865,7 +872,7 @@ namespace TL
[0x6CA9C2E9] = typeof(PollAnswer),
[0x86E18161] = typeof(Poll),
[0x3B6DDAD2] = typeof(PollAnswerVoters),
- [0xDCB82EA3] = typeof(PollResults),
+ [0x7ADF2420] = typeof(PollResults),
[0xF041E250] = typeof(ChatOnlines),
[0x47A971E0] = typeof(StatsURL),
[0x5FB224D5] = typeof(ChatAdminRights),
@@ -877,7 +884,7 @@ namespace TL
[0xCDC3858C] = typeof(Account_WallPapers),
[0xAD253D78] = typeof(CodeSettings),
[0x1DC1BCA4] = typeof(WallPaperSettings),
- [0x8EFAB953] = typeof(AutoDownloadSettings),
+ [0xBAA57628] = typeof(AutoDownloadSettings),
[0x63CACF26] = typeof(Account_AutoDownloadSettings),
[0xD5B3B9F9] = typeof(EmojiKeyword),
[0x236DF622] = typeof(EmojiKeywordDeleted),
@@ -909,10 +916,8 @@ namespace TL
[0x8FDE504F] = typeof(InputThemeSettings),
[0xFA58B6D4] = typeof(ThemeSettings),
[0x54B56617] = typeof(WebPageAttributeTheme),
- [0x34D247B4] = typeof(MessageUserVote),
- [0x3CA5B0EC] = typeof(MessageUserVoteInputOption),
- [0x8A65E557] = typeof(MessageUserVoteMultiple),
- [0x0823F649] = typeof(Messages_VotesList),
+ [0x939A4671] = typeof(WebPageAttributeStory),
+ [0x4899484E] = typeof(Messages_VotesList),
[0xF568028A] = typeof(BankCardOpenUrl),
[0x3E24E573] = typeof(Payments_BankCardData),
[0x7438F7E8] = typeof(DialogFilter),
@@ -936,7 +941,7 @@ namespace TL
[0xD7584C87] = typeof(StatsGroupTopAdmin),
[0x535F779D] = typeof(StatsGroupTopInviter),
[0xEF7FF916] = typeof(Stats_MegagroupStats),
- [0xBEA2F424] = typeof(GlobalPrivacySettings),
+ [0x734C4CCB] = typeof(GlobalPrivacySettings),
[0x4203C5EF] = typeof(Help_CountryCode),
[0xC3878E23] = typeof(Help_Country),
[0x93CC1F32] = null,//Help_CountriesListNotModified
@@ -945,6 +950,7 @@ namespace TL
[0xB6C4F543] = typeof(Messages_MessageViews),
[0xA6341782] = typeof(Messages_DiscussionMessage),
[0xA6D57763] = typeof(MessageReplyHeader),
+ [0x9C98BFC1] = typeof(MessageReplyStoryHeader),
[0x83D60FC2] = typeof(MessageReplies),
[0xE8FD8014] = typeof(PeerBlocked),
[0x8999F295] = typeof(Stats_MessageStats),
@@ -980,7 +986,7 @@ namespace TL
[0xE3779861] = typeof(Account_ResetPasswordFailedWait),
[0xE9EFFC7D] = typeof(Account_ResetPasswordRequestedWait),
[0xE926D63E] = typeof(Account_ResetPasswordOk),
- [0xFC25B828] = typeof(SponsoredMessage),
+ [0xDAAFFF6B] = typeof(SponsoredMessage),
[0xC9EE1D87] = typeof(Messages_SponsoredMessages),
[0x1839490F] = null,//Messages_SponsoredMessagesEmpty
[0xC9B0539F] = typeof(SearchResultsCalendarPeriod),
@@ -1093,9 +1099,29 @@ namespace TL
[0x1DCD839D] = typeof(Chatlists_ChatlistInvite),
[0x93BD878D] = typeof(Chatlists_ChatlistUpdates),
[0xE8A775B0] = typeof(Bots_BotInfo),
+ [0xB6CC2D5C] = typeof(MessagePeerVote),
+ [0x74CDA504] = typeof(MessagePeerVoteInputOption),
+ [0x4628F6E6] = typeof(MessagePeerVoteMultiple),
+ [0x3DB8EC63] = typeof(SponsoredWebPage),
+ [0xD36760CF] = typeof(StoryViews),
+ [0x51E6EE4F] = typeof(StoryItemDeleted),
+ [0xFFADC913] = typeof(StoryItemSkipped),
+ [0x562AA637] = typeof(StoryItem),
+ [0x8611A200] = typeof(UserStories),
+ [0x47E0A07E] = typeof(Stories_AllStoriesNotModified),
+ [0x839E0428] = typeof(Stories_AllStories),
+ [0x4FE57DF1] = typeof(Stories_Stories),
+ [0x37A6FF5F] = typeof(Stories_UserStories),
+ [0xA71AACC2] = typeof(StoryView),
+ [0xFB3F77AC] = typeof(Stories_StoryViewsList),
+ [0xDE9EED1D] = typeof(Stories_StoryViews),
+ [0x9C5386E4] = typeof(InputReplyToMessage),
+ [0x15B0F283] = typeof(InputReplyToStory),
+ [0x3FC9053B] = typeof(ExportedStoryLink),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x91CC4674] = typeof(Layer73.DecryptedMessage),
+ [0x0EF02CE6] = typeof(Layer66.DocumentAttributeVideo),
[0xBB718624] = typeof(Layer66.SendMessageUploadRoundAction),
[0xE50511D8] = typeof(Layer46.DecryptedMessageMediaWebPage),
[0x8A0DF56F] = typeof(Layer46.DecryptedMessageMediaVenue),
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index ad1e28b..619e99b 100644
--- a/src/WTelegramClient.csproj
+++ b/src/WTelegramClient.csproj
@@ -13,7 +13,7 @@
WTelegramClient
0.0.0
Wizou
- Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 158
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 160
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))
Copyright © Olivier Marcoux 2021-2023
MIT
https://github.com/wiz0u/WTelegramClient