API Layer 162: more stories & blocking stuff...

This commit is contained in:
Wizou 2023-09-06 18:29:50 +02:00
parent e20d4d715c
commit 38efb05923
6 changed files with 315 additions and 41 deletions

View file

@ -1,4 +1,4 @@
[![API Layer](https://img.shields.io/badge/API_Layer-160-blueviolet)](https://corefork.telegram.org/methods)
[![API Layer](https://img.shields.io/badge/API_Layer-162-blueviolet)](https://corefork.telegram.org/methods)
[![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)
[![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://www.buymeacoffee.com/wizou)

View file

@ -750,6 +750,9 @@ namespace WTelegram
(ci.flags.HasFlag(ChatInvite.Flags.broadcast) ? Channel.Flags.broadcast : 0) |
(ci.flags.HasFlag(ChatInvite.Flags.public_) ? Channel.Flags.has_username : 0) |
(ci.flags.HasFlag(ChatInvite.Flags.megagroup) ? Channel.Flags.megagroup : 0) |
(ci.flags.HasFlag(ChatInvite.Flags.verified) ? Channel.Flags.verified : 0) |
(ci.flags.HasFlag(ChatInvite.Flags.scam) ? Channel.Flags.scam : 0) |
(ci.flags.HasFlag(ChatInvite.Flags.fake) ? Channel.Flags.fake : 0) |
(ci.flags.HasFlag(ChatInvite.Flags.request_needed) ? Channel.Flags.join_request : 0) };
}
return null;

View file

@ -2129,6 +2129,7 @@ namespace TL
attach_menu = 0x2,
/// <summary>Field <see cref="app"/> has a value</summary>
has_app = 0x4,
from_request = 0x8,
}
}
/// <summary>Secure <a href="https://corefork.telegram.org/passport">telegram passport</a> values were received <para>See <a href="https://corefork.telegram.org/constructor/messageActionSecureValuesSentMe"/></para></summary>
@ -3008,6 +3009,7 @@ namespace TL
/// <summary>Field <see cref="stories"/> has a value</summary>
has_stories = 0x2000000,
stories_pinned_available = 0x4000000,
blocked_my_stories_from = 0x8000000,
}
}
@ -4207,13 +4209,19 @@ namespace TL
public int read_max_id;
}
/// <summary>A peer was blocked <para>See <a href="https://corefork.telegram.org/constructor/updatePeerBlocked"/></para></summary>
[TLDef(0x246A4B22)]
[TLDef(0xEBE07752)]
public class UpdatePeerBlocked : Update
{
public Flags flags;
/// <summary>The blocked peer</summary>
public Peer peer_id;
/// <summary>Whether the peer was blocked or unblocked</summary>
public bool blocked;
[Flags] public enum Flags : uint
{
/// <summary>Whether the peer was blocked or unblocked</summary>
blocked = 0x1,
blocked_my_stories_from = 0x2,
}
}
/// <summary>A user is typing in a <a href="https://corefork.telegram.org/api/channel">supergroup, channel</a> or <a href="https://corefork.telegram.org/api/threads">message thread</a> <para>See <a href="https://corefork.telegram.org/constructor/updateChannelUserTyping"/></para></summary>
[TLDef(0x8C88C923)]
@ -4637,6 +4645,20 @@ namespace TL
public int id;
public long random_id;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateStoriesStealthMode"/></para></summary>
[TLDef(0x2C084DC1)]
public class UpdateStoriesStealthMode : Update
{
public StoriesStealthMode stealth_mode;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateSentStoryReaction"/></para></summary>
[TLDef(0xE3A73D20)]
public class UpdateSentStoryReaction : Update
{
public long user_id;
public int story_id;
public Reaction reaction;
}
/// <summary>Updates state. <para>See <a href="https://corefork.telegram.org/constructor/updates.state"/></para></summary>
[TLDef(0xA56C2A3E)]
@ -6456,6 +6478,9 @@ namespace TL
has_about = 0x20,
/// <summary>Whether the <a href="https://corefork.telegram.org/api/invites#join-requests">join request »</a> must be first approved by an administrator</summary>
request_needed = 0x40,
verified = 0x80,
scam = 0x100,
fake = 0x200,
}
}
/// <summary>A chat invitation that also allows peeking into the group to read messages without joining it. <para>See <a href="https://corefork.telegram.org/constructor/chatInvitePeek"/></para></summary>
@ -14986,16 +15011,18 @@ namespace TL
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/storyViews"/></para></summary>
[TLDef(0xD36760CF)]
[TLDef(0xC64C0B97)]
public class StoryViews : IObject
{
public Flags flags;
public int views_count;
public int reactions_count;
[IfFlag(0)] public long[] recent_viewers;
[Flags] public enum Flags : uint
{
has_recent_viewers = 0x1,
has_viewers = 0x2,
}
}
@ -15029,7 +15056,7 @@ namespace TL
public override int ID => id;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/storyItem"/></para></summary>
[TLDef(0x562AA637)]
[TLDef(0x44C457CE)]
public class StoryItem : StoryItemBase
{
public Flags flags;
@ -15039,8 +15066,10 @@ namespace TL
[IfFlag(0)] public string caption;
[IfFlag(1)] public MessageEntity[] entities;
public MessageMedia media;
[IfFlag(14)] public MediaArea[] media_areas;
[IfFlag(2)] public PrivacyRule[] privacy;
[IfFlag(3)] public StoryViews views;
[IfFlag(15)] public Reaction sent_reaction;
[Flags] public enum Flags : uint
{
@ -15056,6 +15085,8 @@ namespace TL
edited = 0x800,
contacts = 0x1000,
selected_contacts = 0x2000,
has_media_areas = 0x4000,
has_sent_reaction = 0x8000,
}
public override int ID => id;
@ -15079,13 +15110,19 @@ namespace TL
/// <summary><para>See <a href="https://corefork.telegram.org/type/stories.AllStories"/></para></summary>
public abstract class Stories_AllStoriesBase : IObject { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/stories.allStoriesNotModified"/></para></summary>
[TLDef(0x47E0A07E)]
[TLDef(0x1158FE3E)]
public class Stories_AllStoriesNotModified : Stories_AllStoriesBase
{
public Flags flags;
public string state;
public StoriesStealthMode stealth_mode;
[Flags] public enum Flags : uint
{
}
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/stories.allStories"/></para></summary>
[TLDef(0x839E0428)]
[TLDef(0x519D899E)]
public class Stories_AllStories : Stories_AllStoriesBase
{
public Flags flags;
@ -15093,6 +15130,7 @@ namespace TL
public string state;
public UserStories[] user_stories;
public Dictionary<long, User> users;
public StoriesStealthMode stealth_mode;
[Flags] public enum Flags : uint
{
@ -15118,20 +15156,37 @@ namespace TL
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/storyView"/></para></summary>
[TLDef(0xA71AACC2)]
[TLDef(0xB0BDEAC5)]
public class StoryView : IObject
{
public Flags flags;
public long user_id;
public DateTime date;
[IfFlag(2)] public Reaction reaction;
[Flags] public enum Flags : uint
{
blocked = 0x1,
blocked_my_stories_from = 0x2,
has_reaction = 0x4,
}
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/stories.storyViewsList"/></para></summary>
[TLDef(0xFB3F77AC)]
[TLDef(0x46E9B9EC)]
public class Stories_StoryViewsList : IObject
{
public Flags flags;
public int count;
public int reactions_count;
public StoryView[] views;
public Dictionary<long, User> users;
[IfFlag(0)] public string next_offset;
[Flags] public enum Flags : uint
{
has_next_offset = 0x1,
}
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/stories.storyViews"/></para></summary>
@ -15171,4 +15226,60 @@ namespace TL
{
public string link;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/storiesStealthMode"/></para></summary>
[TLDef(0x712E27FD)]
public class StoriesStealthMode : IObject
{
public Flags flags;
[IfFlag(0)] public DateTime active_until_date;
[IfFlag(1)] public DateTime cooldown_until_date;
[Flags] public enum Flags : uint
{
has_active_until_date = 0x1,
has_cooldown_until_date = 0x2,
}
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/mediaAreaCoordinates"/></para></summary>
[TLDef(0x03D1EA4E)]
public class MediaAreaCoordinates : IObject
{
public double x;
public double y;
public double w;
public double h;
public double rotation;
}
/// <summary><para>See <a href="https://corefork.telegram.org/type/MediaArea"/></para></summary>
public abstract class MediaArea : IObject
{
public MediaAreaCoordinates coordinates;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/mediaAreaVenue"/></para></summary>
[TLDef(0xBE82DB9C, inheritBefore = true)]
public class MediaAreaVenue : MediaArea
{
public GeoPoint geo;
public string title;
public string address;
public string provider;
public string venue_id;
public string venue_type;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputMediaAreaVenue"/></para></summary>
[TLDef(0xB282217F, inheritBefore = true)]
public class InputMediaAreaVenue : MediaArea
{
public long query_id;
public string result_id;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/mediaAreaGeoPoint"/></para></summary>
[TLDef(0xDF8B3B22, inheritBefore = true)]
public class MediaAreaGeoPoint : MediaArea
{
public GeoPoint geo;
}
}

View file

@ -445,8 +445,8 @@ namespace TL
});
/// <summary>Change privacy settings of current account <para>See <a href="https://corefork.telegram.org/method/account.setPrivacy"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/account.setPrivacy#possible-errors">details</a>)</para></summary>
/// <param name="key">Peers to which the privacy rules apply</param>
/// <param name="rules">New privacy rules</param>
/// <param name="key">New privacy rule</param>
/// <param name="rules">Peers to which the privacy rule will apply.</param>
public static Task<Account_PrivacyRules> Account_SetPrivacy(this Client client, InputPrivacyKey key, params InputPrivacyRule[] rules)
=> client.Invoke(new Account_SetPrivacy
{
@ -1233,26 +1233,29 @@ namespace TL
/// <summary>Adds the user to the blacklist. <para>See <a href="https://corefork.telegram.org/method/contacts.block"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/contacts.block#possible-errors">details</a>)</para></summary>
/// <param name="id">User ID</param>
public static Task<bool> Contacts_Block(this Client client, InputPeer id)
public static Task<bool> Contacts_Block(this Client client, InputPeer id, bool my_stories_from = false)
=> client.Invoke(new Contacts_Block
{
flags = (Contacts_Block.Flags)(my_stories_from ? 0x1 : 0),
id = id,
});
/// <summary>Deletes the user from the blacklist. <para>See <a href="https://corefork.telegram.org/method/contacts.unblock"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/contacts.unblock#possible-errors">details</a>)</para></summary>
/// <param name="id">User ID</param>
public static Task<bool> Contacts_Unblock(this Client client, InputPeer id)
public static Task<bool> Contacts_Unblock(this Client client, InputPeer id, bool my_stories_from = false)
=> client.Invoke(new Contacts_Unblock
{
flags = (Contacts_Unblock.Flags)(my_stories_from ? 0x1 : 0),
id = id,
});
/// <summary>Returns the list of blocked users. <para>See <a href="https://corefork.telegram.org/method/contacts.getBlocked"/></para></summary>
/// <param name="offset">The number of list elements to be skipped</param>
/// <param name="limit">The number of list elements to be returned</param>
public static Task<Contacts_Blocked> Contacts_GetBlocked(this Client client, int offset = default, int limit = int.MaxValue)
public static Task<Contacts_Blocked> Contacts_GetBlocked(this Client client, int offset = default, int limit = int.MaxValue, bool my_stories_from = false)
=> client.Invoke(new Contacts_GetBlocked
{
flags = (Contacts_GetBlocked.Flags)(my_stories_from ? 0x1 : 0),
offset = offset,
limit = limit,
});
@ -1412,6 +1415,15 @@ namespace TL
hidden = hidden,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/contacts.setBlocked"/></para></summary>
public static Task<bool> Contacts_SetBlocked(this Client client, InputPeer[] id, int limit = int.MaxValue, bool my_stories_from = false)
=> client.Invoke(new Contacts_SetBlocked
{
flags = (Contacts_SetBlocked.Flags)(my_stories_from ? 0x1 : 0),
id = id,
limit = limit,
});
/// <summary><para>⚠ <b>This method is only for basic Chat</b>. See <see href="https://wiz0u.github.io/WTelegramClient/README#terminology">Terminology</see> to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Returns the list of messages by their IDs. <para>See <a href="https://corefork.telegram.org/method/messages.getMessages"/> [bots: ✓]</para></summary>
/// <param name="id">Message ID list</param>
public static Task<Messages_MessagesBase> Messages_GetMessages(this Client client, params InputMessage[] id)
@ -1424,7 +1436,7 @@ namespace TL
/// <param name="exclude_pinned">Exclude pinned dialogs</param>
/// <param name="folder_id"><a href="https://corefork.telegram.org/api/folders#peer-folders">Peer folder ID, for more info click here</a></param>
/// <param name="offset_date"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
/// <param name="offset_id"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
/// <param name="offset_id"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a> (<c>top_message</c> ID used for pagination)</param>
/// <param name="offset_peer"><a href="https://corefork.telegram.org/api/offsets">Offset peer for pagination</a></param>
/// <param name="limit">Number of list elements to be returned</param>
/// <param name="hash"><a href="https://corefork.telegram.org/api/offsets#hash-generation">Hash for pagination, for more info click here</a></param>
@ -3776,7 +3788,7 @@ namespace TL
/// <summary>Saves a part of file for further sending to one of the methods. <para>See <a href="https://corefork.telegram.org/method/upload.saveFilePart"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/upload.saveFilePart#possible-errors">details</a>)</para></summary>
/// <param name="file_id">Random file identifier created by the client</param>
/// <param name="file_part">Numerical order of a part</param>
/// <param name="bytes">Binary data, contend of a part</param>
/// <param name="bytes">Binary data, content of a part</param>
public static Task<bool> Upload_SaveFilePart(this Client client, long file_id, int file_part, byte[] bytes)
=> client.Invoke(new Upload_SaveFilePart
{
@ -4797,6 +4809,29 @@ namespace TL
active = active,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/bots.canSendMessage"/></para></summary>
public static Task<bool> Bots_CanSendMessage(this Client client, InputUserBase bot)
=> client.Invoke(new Bots_CanSendMessage
{
bot = bot,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/bots.allowSendMessage"/></para></summary>
public static Task<UpdatesBase> Bots_AllowSendMessage(this Client client, InputUserBase bot)
=> client.Invoke(new Bots_AllowSendMessage
{
bot = bot,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/bots.invokeWebViewCustomMethod"/></para></summary>
public static Task<DataJSON> Bots_InvokeWebViewCustomMethod(this Client client, InputUserBase bot, string custom_method, DataJSON params_)
=> client.Invoke(new Bots_InvokeWebViewCustomMethod
{
bot = bot,
custom_method = custom_method,
params_ = params_,
});
/// <summary>Get a payment form <para>See <a href="https://corefork.telegram.org/method/payments.getPaymentForm"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.getPaymentForm#possible-errors">details</a>)</para></summary>
/// <param name="invoice">Invoice</param>
/// <param name="theme_params">A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages: <br/><c>bg_color</c> - Background color <br/><c>text_color</c> - Text color <br/><c>hint_color</c> - Hint text color <br/><c>link_color</c> - Link color <br/><c>button_color</c> - Button color <br/><c>button_text_color</c> - Button text color</param>
@ -5612,12 +5647,19 @@ namespace TL
peers = peers,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.canSendStory"/></para></summary>
public static Task<bool> Stories_CanSendStory(this Client client)
=> client.Invoke(new Stories_CanSendStory
{
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.sendStory"/></para></summary>
public static Task<UpdatesBase> 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)
public static Task<UpdatesBase> Stories_SendStory(this Client client, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, MediaArea[] media_areas = 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)),
flags = (Stories_SendStory.Flags)((caption != null ? 0x1 : 0) | (entities != null ? 0x2 : 0) | (period != null ? 0x8 : 0) | (media_areas != null ? 0x20 : 0) | (pinned ? 0x4 : 0) | (noforwards ? 0x10 : 0)),
media = media,
media_areas = media_areas,
caption = caption,
entities = entities,
privacy_rules = privacy_rules,
@ -5626,12 +5668,13 @@ namespace TL
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.editStory"/></para></summary>
public static Task<UpdatesBase> Stories_EditStory(this Client client, int id, InputMedia media = null, string caption = null, MessageEntity[] entities = null, InputPrivacyRule[] privacy_rules = null)
public static Task<UpdatesBase> Stories_EditStory(this Client client, int id, InputMedia media = null, string caption = null, MessageEntity[] entities = null, InputPrivacyRule[] privacy_rules = null, MediaArea[] media_areas = 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)),
flags = (Stories_EditStory.Flags)((media != null ? 0x1 : 0) | (caption != null ? 0x2 : 0) | (entities != null ? 0x2 : 0) | (privacy_rules != null ? 0x4 : 0) | (media_areas != null ? 0x8 : 0)),
id = id,
media = media,
media_areas = media_areas,
caption = caption,
entities = entities,
privacy_rules = privacy_rules,
@ -5722,12 +5765,13 @@ namespace TL
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.getStoryViewsList"/></para></summary>
public static Task<Stories_StoryViewsList> Stories_GetStoryViewsList(this Client client, int id, DateTime offset_date = default, long offset_id = default, int limit = int.MaxValue)
public static Task<Stories_StoryViewsList> Stories_GetStoryViewsList(this Client client, int id, string offset, int limit = int.MaxValue, string q = null, bool just_contacts = false, bool reactions_first = false)
=> client.Invoke(new Stories_GetStoryViewsList
{
flags = (Stories_GetStoryViewsList.Flags)((q != null ? 0x2 : 0) | (just_contacts ? 0x1 : 0) | (reactions_first ? 0x4 : 0)),
q = q,
id = id,
offset_date = offset_date,
offset_id = offset_id,
offset = offset,
limit = limit,
});
@ -5755,6 +5799,23 @@ namespace TL
reason = reason,
message = message,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.activateStealthMode"/></para></summary>
public static Task<UpdatesBase> Stories_ActivateStealthMode(this Client client, bool past = false, bool future = false)
=> client.Invoke(new Stories_ActivateStealthMode
{
flags = (Stories_ActivateStealthMode.Flags)((past ? 0x1 : 0) | (future ? 0x2 : 0)),
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.sendReaction"/></para></summary>
public static Task<UpdatesBase> Stories_SendReaction(this Client client, InputUserBase user_id, int story_id, Reaction reaction, bool add_to_recent = false)
=> client.Invoke(new Stories_SendReaction
{
flags = (Stories_SendReaction.Flags)(add_to_recent ? 0x1 : 0),
user_id = user_id,
story_id = story_id,
reaction = reaction,
});
}
}
@ -6695,23 +6756,41 @@ namespace TL.Methods
public string[] phones;
}
[TLDef(0x68CC1411)]
[TLDef(0x2E2E8734)]
public class Contacts_Block : IMethod<bool>
{
public Flags flags;
public InputPeer id;
[Flags] public enum Flags : uint
{
my_stories_from = 0x1,
}
}
[TLDef(0xBEA65D50)]
[TLDef(0xB550D328)]
public class Contacts_Unblock : IMethod<bool>
{
public Flags flags;
public InputPeer id;
[Flags] public enum Flags : uint
{
my_stories_from = 0x1,
}
}
[TLDef(0xF57C350F)]
[TLDef(0x9A868F80)]
public class Contacts_GetBlocked : IMethod<Contacts_Blocked>
{
public Flags flags;
public int offset;
public int limit;
[Flags] public enum Flags : uint
{
my_stories_from = 0x1,
}
}
[TLDef(0x11F812D8)]
@ -6844,6 +6923,19 @@ namespace TL.Methods
public bool hidden;
}
[TLDef(0x94C65C76)]
public class Contacts_SetBlocked : IMethod<bool>
{
public Flags flags;
public InputPeer[] id;
public int limit;
[Flags] public enum Flags : uint
{
my_stories_from = 0x1,
}
}
[TLDef(0x63C66506)]
public class Messages_GetMessages : IMethod<Messages_MessagesBase>
{
@ -9621,6 +9713,26 @@ namespace TL.Methods
public bool active;
}
[TLDef(0x1359F4E6)]
public class Bots_CanSendMessage : IMethod<bool>
{
public InputUserBase bot;
}
[TLDef(0xF132E3EF)]
public class Bots_AllowSendMessage : IMethod<UpdatesBase>
{
public InputUserBase bot;
}
[TLDef(0x087FC5E7)]
public class Bots_InvokeWebViewCustomMethod : IMethod<DataJSON>
{
public InputUserBase bot;
public string custom_method;
public DataJSON params_;
}
[TLDef(0x37148DBB)]
public class Payments_GetPaymentForm : IMethod<Payments_PaymentForm>
{
@ -10299,11 +10411,15 @@ namespace TL.Methods
public InputPeer[] peers;
}
[TLDef(0x424CD47A)]
[TLDef(0xB100D45D)]
public class Stories_CanSendStory : IMethod<bool> { }
[TLDef(0xD455FCEC)]
public class Stories_SendStory : IMethod<UpdatesBase>
{
public Flags flags;
public InputMedia media;
[IfFlag(5)] public MediaArea[] media_areas;
[IfFlag(0)] public string caption;
[IfFlag(1)] public MessageEntity[] entities;
public InputPrivacyRule[] privacy_rules;
@ -10317,15 +10433,17 @@ namespace TL.Methods
pinned = 0x4,
has_period = 0x8,
noforwards = 0x10,
has_media_areas = 0x20,
}
}
[TLDef(0x2AAE7A41)]
[TLDef(0xA9B91AE4)]
public class Stories_EditStory : IMethod<UpdatesBase>
{
public Flags flags;
public int id;
[IfFlag(0)] public InputMedia media;
[IfFlag(3)] public MediaArea[] media_areas;
[IfFlag(1)] public string caption;
[IfFlag(1)] public MessageEntity[] entities;
[IfFlag(2)] public InputPrivacyRule[] privacy_rules;
@ -10335,6 +10453,7 @@ namespace TL.Methods
has_media = 0x1,
has_caption = 0x2,
has_privacy_rules = 0x4,
has_media_areas = 0x8,
}
}
@ -10416,13 +10535,21 @@ namespace TL.Methods
public int[] id;
}
[TLDef(0x4B3B5E97)]
[TLDef(0xF95F61A4)]
public class Stories_GetStoryViewsList : IMethod<Stories_StoryViewsList>
{
public Flags flags;
[IfFlag(1)] public string q;
public int id;
public DateTime offset_date;
public long offset_id;
public string offset;
public int limit;
[Flags] public enum Flags : uint
{
just_contacts = 0x1,
has_q = 0x2,
reactions_first = 0x4,
}
}
[TLDef(0x9A75D6A6)]
@ -10446,4 +10573,30 @@ namespace TL.Methods
public ReportReason reason;
public string message;
}
[TLDef(0x57BBD166)]
public class Stories_ActivateStealthMode : IMethod<UpdatesBase>
{
public Flags flags;
[Flags] public enum Flags : uint
{
past = 0x1,
future = 0x2,
}
}
[TLDef(0x49AAA9B3)]
public class Stories_SendReaction : IMethod<UpdatesBase>
{
public Flags flags;
public InputUserBase user_id;
public int story_id;
public Reaction reaction;
[Flags] public enum Flags : uint
{
add_to_recent = 0x1,
}
}
}

View file

@ -6,7 +6,7 @@ namespace TL
{
public static class Layer
{
public const int Version = 160; // fetched 21/07/2023 07:55:22
public const int Version = 162; // fetched 06/09/2023 16:21:22
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@ -342,7 +342,7 @@ namespace TL
[0xD29A27F4] = typeof(UpdateChannelMessageForwards),
[0xD6B19546] = typeof(UpdateReadChannelDiscussionInbox),
[0x695C9E7C] = typeof(UpdateReadChannelDiscussionOutbox),
[0x246A4B22] = typeof(UpdatePeerBlocked),
[0xEBE07752] = typeof(UpdatePeerBlocked),
[0x8C88C923] = typeof(UpdateChannelUserTyping),
[0xED85EAB5] = typeof(UpdatePinnedMessages),
[0x5BB98608] = typeof(UpdatePinnedChannelMessages),
@ -377,6 +377,8 @@ namespace TL
[0x205A4133] = typeof(UpdateStory),
[0xFEB5345A] = typeof(UpdateReadStories),
[0x1BF335B9] = typeof(UpdateStoryID),
[0x2C084DC1] = typeof(UpdateStoriesStealthMode),
[0xE3A73D20] = typeof(UpdateSentStoryReaction),
[0xA56C2A3E] = typeof(Updates_State),
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
[0x00F49CA0] = typeof(Updates_Difference),
@ -1103,21 +1105,26 @@ namespace TL
[0x74CDA504] = typeof(MessagePeerVoteInputOption),
[0x4628F6E6] = typeof(MessagePeerVoteMultiple),
[0x3DB8EC63] = typeof(SponsoredWebPage),
[0xD36760CF] = typeof(StoryViews),
[0xC64C0B97] = typeof(StoryViews),
[0x51E6EE4F] = typeof(StoryItemDeleted),
[0xFFADC913] = typeof(StoryItemSkipped),
[0x562AA637] = typeof(StoryItem),
[0x44C457CE] = typeof(StoryItem),
[0x8611A200] = typeof(UserStories),
[0x47E0A07E] = typeof(Stories_AllStoriesNotModified),
[0x839E0428] = typeof(Stories_AllStories),
[0x1158FE3E] = typeof(Stories_AllStoriesNotModified),
[0x519D899E] = typeof(Stories_AllStories),
[0x4FE57DF1] = typeof(Stories_Stories),
[0x37A6FF5F] = typeof(Stories_UserStories),
[0xA71AACC2] = typeof(StoryView),
[0xFB3F77AC] = typeof(Stories_StoryViewsList),
[0xB0BDEAC5] = typeof(StoryView),
[0x46E9B9EC] = typeof(Stories_StoryViewsList),
[0xDE9EED1D] = typeof(Stories_StoryViews),
[0x9C5386E4] = typeof(InputReplyToMessage),
[0x15B0F283] = typeof(InputReplyToStory),
[0x3FC9053B] = typeof(ExportedStoryLink),
[0x712E27FD] = typeof(StoriesStealthMode),
[0x03D1EA4E] = typeof(MediaAreaCoordinates),
[0xBE82DB9C] = typeof(MediaAreaVenue),
[0xB282217F] = typeof(InputMediaAreaVenue),
[0xDF8B3B22] = typeof(MediaAreaGeoPoint),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x91CC4674] = typeof(Layer73.DecryptedMessage),

View file

@ -13,7 +13,7 @@
<PackageId>WTelegramClient</PackageId>
<Version>0.0.0</Version>
<Authors>Wizou</Authors>
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 160&#10;&#10;Release Notes:&#10;$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 162&#10;&#10;Release Notes:&#10;$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>
<Copyright>Copyright © Olivier Marcoux 2021-2023</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/wiz0u/WTelegramClient</PackageProjectUrl>