Some more implicit Input conversions

This commit is contained in:
Wizou 2023-10-09 15:19:03 +02:00
parent 2b7868ee16
commit fb8d1c2d07
5 changed files with 73 additions and 25 deletions

2
.github/dev.yml vendored
View file

@ -1,7 +1,7 @@
pr: none
trigger: [ master ]
name: 3.5.7-dev.$(Rev:r)
name: 3.5.8-dev.$(Rev:r)
pool:
vmImage: ubuntu-latest

View file

@ -668,6 +668,7 @@ namespace WTelegram
}
/// <summary>If you want to get all messages from a chat, use method Messages_GetHistory</summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1822")]
public Task<Messages_MessagesBase> GetMessages(InputPeer peer)
=> throw new WTException("If you want to get all messages from a chat, use method Messages_GetHistory");

View file

@ -381,6 +381,13 @@ namespace TL
public static implicit operator InputGeoPoint(GeoPoint geo) => new() { lat = geo.lat, lon = geo.lon, accuracy_radius = geo.accuracy_radius, flags = (InputGeoPoint.Flags)geo.flags };
}
partial class InputNotifyPeerBase
{
public static implicit operator InputNotifyPeerBase(InputPeer peer) => new InputNotifyPeer { peer = peer };
public static implicit operator InputNotifyPeerBase(ChatBase chat) => new InputNotifyPeer { peer = chat };
public static implicit operator InputNotifyPeerBase(UserBase user) => new InputNotifyPeer { peer = user };
}
partial class WallPaperBase { public static implicit operator InputWallPaperBase(WallPaperBase wp) => wp.ToInputWallPaper();
protected abstract InputWallPaperBase ToInputWallPaper(); }
partial class WallPaper { protected override InputWallPaperBase ToInputWallPaper() => new InputWallPaper { id = id, access_hash = access_hash }; }
@ -620,6 +627,8 @@ namespace TL
partial class InputDialogPeerBase
{
public static implicit operator InputDialogPeerBase(InputPeer peer) => new InputDialogPeer { peer = peer };
public static implicit operator InputDialogPeerBase(ChatBase chat) => new InputDialogPeer { peer = chat };
public static implicit operator InputDialogPeerBase(UserBase user) => new InputDialogPeer { peer = user };
}
partial class SecureFile

View file

@ -2677,7 +2677,7 @@ namespace TL
}
/// <summary>Object defines the set of users and/or groups that generate notifications. <para>See <a href="https://corefork.telegram.org/type/InputNotifyPeer"/></para> <para>Derived classes: <see cref="InputNotifyPeer"/>, <see cref="InputNotifyUsers"/>, <see cref="InputNotifyChats"/>, <see cref="InputNotifyBroadcasts"/>, <see cref="InputNotifyForumTopic"/></para></summary>
public abstract class InputNotifyPeerBase : IObject { }
public abstract partial class InputNotifyPeerBase : IObject { }
/// <summary>Notifications generated by a certain user or group. <para>See <a href="https://corefork.telegram.org/constructor/inputNotifyPeer"/></para></summary>
[TLDef(0xB8BC5B0C)]
public class InputNotifyPeer : InputNotifyPeerBase
@ -4687,10 +4687,11 @@ namespace TL
public int id;
public long random_id;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateStoriesStealthMode"/></para></summary>
/// <summary>Indicates that <a href="https://corefork.telegram.org/api/stories#stealth-mode">stories stealth mode</a> was activated. <para>See <a href="https://corefork.telegram.org/constructor/updateStoriesStealthMode"/></para></summary>
[TLDef(0x2C084DC1)]
public class UpdateStoriesStealthMode : Update
{
/// <summary>Information about the current <a href="https://corefork.telegram.org/api/stories#stealth-mode">stealth mode</a> session.</summary>
public StoriesStealthMode stealth_mode;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateSentStoryReaction"/></para></summary>
@ -11713,8 +11714,11 @@ namespace TL
other = 0x1000,
/// <summary>If set, allows the admin to create, delete or modify <a href="https://corefork.telegram.org/api/forum#forum-topics">forum topics »</a>.</summary>
manage_topics = 0x2000,
/// <summary>If set, allows the admin to post <a href="https://corefork.telegram.org/api/stories#channel-stories">stories</a> as the <a href="https://corefork.telegram.org/api/channel">channel</a>.</summary>
post_stories = 0x4000,
/// <summary>If set, allows the admin to edit <a href="https://corefork.telegram.org/api/stories#channel-stories">stories</a> posted by the other admins of the <a href="https://corefork.telegram.org/api/channel">channel</a>.</summary>
edit_stories = 0x8000,
/// <summary>If set, allows the admin to delete <a href="https://corefork.telegram.org/api/stories#channel-stories">stories</a> posted by the other admins of the <a href="https://corefork.telegram.org/api/channel">channel</a>.</summary>
delete_stories = 0x10000,
}
}
@ -12190,7 +12194,7 @@ namespace TL
[TLDef(0x629F1980)]
public class Auth_LoginToken : Auth_LoginTokenBase
{
/// <summary>Expiry date of QR code</summary>
/// <summary>Expiration date of QR code</summary>
public DateTime expires;
/// <summary>Token to render in QR code</summary>
public byte[] token;
@ -14572,7 +14576,7 @@ namespace TL
{
/// <summary>The <a href="https://corefork.telegram.org/api/links#temporary-profile-links">temporary profile link</a>.</summary>
public string url;
/// <summary>Its expiry date</summary>
/// <summary>Its expiration date</summary>
public DateTime expires;
}
@ -15293,13 +15297,15 @@ namespace TL
public string link;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/storiesStealthMode"/></para></summary>
/// <summary>Information about the current <a href="https://corefork.telegram.org/api/stories#stealth-mode">stealth mode</a> session. <para>See <a href="https://corefork.telegram.org/constructor/storiesStealthMode"/></para></summary>
[TLDef(0x712E27FD)]
public class StoriesStealthMode : IObject
{
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags;
/// <summary>The date up to which stealth mode will be active.</summary>
[IfFlag(0)] public DateTime active_until_date;
/// <summary>The date starting from which the user will be allowed to re-enable stealth mode again.</summary>
[IfFlag(1)] public DateTime cooldown_until_date;
[Flags] public enum Flags : uint
@ -15395,16 +15401,21 @@ namespace TL
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/stories.boostsStatus"/></para></summary>
/// <summary>The current <a href="https://corefork.telegram.org/api/stories#boosts">boost status »</a> of a channel. <para>See <a href="https://corefork.telegram.org/constructor/stories.boostsStatus"/></para></summary>
[TLDef(0xE5C1AA5C)]
public class Stories_BoostsStatus : IObject
{
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags;
/// <summary>The current boost level of the channel.</summary>
public int level;
/// <summary>The number of boosts acquired so far in the current level.</summary>
public int current_level_boosts;
/// <summary>Total number of boosts acquired so far.</summary>
public int boosts;
/// <summary>Total number of boosts needed to reach the next level; if absent, the next level isn't available.</summary>
[IfFlag(0)] public int next_level_boosts;
/// <summary>Only returned to channel admins: contains the approximated number of Premium users subscribed to the channel, related to the total number of subscribers.</summary>
[IfFlag(1)] public StatsPercentValue premium_audience;
public string boost_url;
@ -15414,40 +15425,49 @@ namespace TL
has_next_level_boosts = 0x1,
/// <summary>Field <see cref="premium_audience"/> has a value</summary>
has_premium_audience = 0x2,
/// <summary>Whether we're currently boosting this channel.</summary>
my_boost = 0x4,
}
}
/// <summary><para>See <a href="https://corefork.telegram.org/type/stories.CanApplyBoostResult"/></para> <para>Derived classes: <see cref="Stories_CanApplyBoostOk"/>, <see cref="Stories_CanApplyBoostReplace"/></para></summary>
/// <summary>Whether the specified channel can be <a href="https://corefork.telegram.org/api/stories#boosts">boosted, see here for more info »</a>. <para>See <a href="https://corefork.telegram.org/type/stories.CanApplyBoostResult"/></para> <para>Derived classes: <see cref="Stories_CanApplyBoostOk"/>, <see cref="Stories_CanApplyBoostReplace"/></para></summary>
public abstract class Stories_CanApplyBoostResult : IObject { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/stories.canApplyBoostOk"/></para></summary>
/// <summary>We're not boosting any channel, and we can freely boost the specified channel. <para>See <a href="https://corefork.telegram.org/constructor/stories.canApplyBoostOk"/></para></summary>
[TLDef(0xC3173587)]
public class Stories_CanApplyBoostOk : Stories_CanApplyBoostResult { }
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/stories.canApplyBoostReplace"/></para></summary>
/// <summary>We're boosting another channel, but we can freely boost the specified channel. <para>See <a href="https://corefork.telegram.org/constructor/stories.canApplyBoostReplace"/></para></summary>
[TLDef(0x712C4655)]
public class Stories_CanApplyBoostReplace : Stories_CanApplyBoostResult
{
/// <summary>The channel we're currently boosting.</summary>
public Peer current_boost;
/// <summary>Channel information.</summary>
public Dictionary<long, ChatBase> chats;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/booster"/></para></summary>
/// <summary>Info about a <a href="https://corefork.telegram.org/api/stories#boosts">boost</a> made by a specific user. <para>See <a href="https://corefork.telegram.org/constructor/booster"/></para></summary>
[TLDef(0x0E9E6380)]
public class Booster : IObject
{
/// <summary>ID of the user that made the boost.</summary>
public long user_id;
/// <summary>Default expiration date of the boost.</summary>
public DateTime expires;
}
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/stories.boostersList"/></para></summary>
/// <summary>Info about the users currently <a href="https://corefork.telegram.org/api/stories#boosts">boosting</a> the channel. <para>See <a href="https://corefork.telegram.org/constructor/stories.boostersList"/></para></summary>
[TLDef(0xF3DD3D1D)]
public class Stories_BoostersList : IObject
{
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
public Flags flags;
/// <summary>Total number of boosters.</summary>
public int count;
/// <summary>Info about the automatic expiration date of every user's boost.</summary>
public Booster[] boosters;
/// <summary>Next offset for <a href="https://corefork.telegram.org/api/offsets">pagination</a>.</summary>
[IfFlag(0)] public string next_offset;
/// <summary>Info about the users mentioned in the <c>boosters</c> field.</summary>
public Dictionary<long, User> users;
[Flags] public enum Flags : uint

View file

@ -2000,7 +2000,7 @@ namespace TL
is_admin = is_admin,
});
/// <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> Turn a <a href="https://corefork.telegram.org/api/channel#migration">basic group into a supergroup</a> <para>See <a href="https://corefork.telegram.org/method/messages.migrateChat"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403,500 (<a href="https://corefork.telegram.org/method/messages.migrateChat#possible-errors">details</a>)</para></summary>
/// <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> Turn a <a href="https://corefork.telegram.org/api/channel#migration">basic group into a supergroup</a> <para>See <a href="https://corefork.telegram.org/method/messages.migrateChat"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.migrateChat#possible-errors">details</a>)</para></summary>
/// <param name="chat_id"><a href="https://corefork.telegram.org/api/channel#basic-groups">Basic group</a> to migrate</param>
public static Task<UpdatesBase> Messages_MigrateChat(this Client client, long chat_id)
=> client.Invoke(new Messages_MigrateChat
@ -2459,7 +2459,7 @@ namespace TL
error = error,
});
/// <summary>Upload a file and associate it to a chat (without actually sending it to the chat) <para>See <a href="https://corefork.telegram.org/method/messages.uploadMedia"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403,500 (<a href="https://corefork.telegram.org/method/messages.uploadMedia#possible-errors">details</a>)</para></summary>
/// <summary>Upload a file and associate it to a chat (without actually sending it to the chat) <para>See <a href="https://corefork.telegram.org/method/messages.uploadMedia"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.uploadMedia#possible-errors">details</a>)</para></summary>
/// <param name="peer">The chat, can be <see langword="null"/> for bots and <see cref="InputPeerSelf"/> for users.</param>
/// <param name="media">File uploaded in chunks as described in <a href="https://corefork.telegram.org/api/files">files »</a></param>
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messageMediaEmpty">messageMediaEmpty</a></returns>
@ -3207,7 +3207,7 @@ namespace TL
/// <summary>React to message. <para>See <a href="https://corefork.telegram.org/method/messages.sendReaction"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.sendReaction#possible-errors">details</a>)</para></summary>
/// <param name="big">Whether a bigger and longer reaction should be shown</param>
/// <param name="add_to_recent">Add this reaction to the <a href="https://corefork.telegram.org/api/reactions#recent-reactions">recent reactions list »</a>.</param>
/// <param name="add_to_recent">Whether to add this reaction to the <a href="https://corefork.telegram.org/api/reactions#recent-reactions">recent reactions list »</a>.</param>
/// <param name="peer">Peer</param>
/// <param name="msg_id">Message ID to react to</param>
/// <param name="reaction">A list of reactions</param>
@ -3701,7 +3701,7 @@ namespace TL
limit = limit,
});
/// <summary>Installs a previously uploaded photo as a profile photo. <para>See <a href="https://corefork.telegram.org/method/photos.updateProfilePhoto"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,500 (<a href="https://corefork.telegram.org/method/photos.updateProfilePhoto#possible-errors">details</a>)</para></summary>
/// <summary>Installs a previously uploaded photo as a profile photo. <para>See <a href="https://corefork.telegram.org/method/photos.updateProfilePhoto"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/photos.updateProfilePhoto#possible-errors">details</a>)</para></summary>
/// <param name="fallback">If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings.</param>
/// <param name="bot">Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user.</param>
/// <param name="id">Input photo</param>
@ -4135,7 +4135,7 @@ namespace TL
channel = channel,
});
/// <summary>Create a <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a>. <para>See <a href="https://corefork.telegram.org/method/channels.createChannel"/></para> <para>Possible <see cref="RpcException"/> codes: 400,406,500 (<a href="https://corefork.telegram.org/method/channels.createChannel#possible-errors">details</a>)</para></summary>
/// <summary>Create a <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a>. <para>See <a href="https://corefork.telegram.org/method/channels.createChannel"/></para> <para>Possible <see cref="RpcException"/> codes: 400,406 (<a href="https://corefork.telegram.org/method/channels.createChannel#possible-errors">details</a>)</para></summary>
/// <param name="broadcast">Whether to create a <a href="https://corefork.telegram.org/api/channel">channel</a></param>
/// <param name="megagroup">Whether to create a <a href="https://corefork.telegram.org/api/channel">supergroup</a></param>
/// <param name="for_import">Whether the supergroup is being created to import messages from a foreign chat service using <see cref="Messages_InitHistoryImport">Messages_InitHistoryImport</see></param>
@ -5634,7 +5634,8 @@ namespace TL
peers = peers,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.canSendStory"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.canSendStory#possible-errors">details</a>)</para></summary>
/// <summary>Check whether we can post stories as the specified peer. <para>See <a href="https://corefork.telegram.org/method/stories.canSendStory"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.canSendStory#possible-errors">details</a>)</para></summary>
/// <param name="peer">The peer from which we wish to post stories.</param>
public static Task<bool> Stories_CanSendStory(this Client client, InputPeer peer)
=> client.Invoke(new Stories_CanSendStory
{
@ -5643,6 +5644,7 @@ namespace TL
/// <summary>Uploads a <a href="https://corefork.telegram.org/api/stories">Telegram Story</a>. <para>See <a href="https://corefork.telegram.org/method/stories.sendStory"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.sendStory#possible-errors">details</a>)</para></summary>
/// <param name="noforwards">If set, disables forwards and story download functionality.</param>
/// <param name="peer">The peer to send the story as.</param>
/// <param name="media">The media file.</param>
/// <param name="caption">Story caption.</param>
/// <param name="entities"><a href="https://corefork.telegram.org/api/entities">Message entities for styled text</a></param>
@ -5662,7 +5664,12 @@ namespace TL
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.editStory"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.editStory#possible-errors">details</a>)</para></summary>
/// <param name="entities"><a href="https://corefork.telegram.org/api/entities">Message entities for styled text</a></param>
/// <param name="peer">Peer where the story was posted.</param>
/// <param name="id">ID of story to edit.</param>
/// <param name="media">If specified, replaces the story media.</param>
/// <param name="caption">If specified, replaces the story caption.</param>
/// <param name="entities"><a href="https://corefork.telegram.org/api/entities">Message entities for styled text in the caption</a></param>
/// <param name="privacy_rules">If specified, alters the privacy settings of the story.</param>
public static Task<UpdatesBase> Stories_EditStory(this Client client, InputPeer peer, int id, InputMedia media = null, string caption = null, MessageEntity[] entities = null, InputPrivacyRule[] privacy_rules = null, MediaArea[] media_areas = null)
=> client.Invoke(new Stories_EditStory
{
@ -5802,14 +5809,20 @@ namespace TL
message = message,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.activateStealthMode"/></para></summary>
/// <summary>Activates <a href="https://corefork.telegram.org/api/stories#stealth-mode">stories stealth mode</a>, see <a href="https://corefork.telegram.org/api/stories#stealth-mode">here »</a> for more info. <para>See <a href="https://corefork.telegram.org/method/stories.activateStealthMode"/></para></summary>
/// <param name="past">Whether to erase views from any stories opened in the past <a href="https://corefork.telegram.org/api/config#stories-stealth-past-period"><c>stories_stealth_past_period</c> seconds »</a>, as specified by the <a href="https://corefork.telegram.org/api/config#client-configuration">client configuration</a>.</param>
/// <param name="future">Whether to hide future story views for the next <a href="https://corefork.telegram.org/api/config#stories-stealth-future-period"><c>stories_stealth_future_period</c> seconds »</a>, as specified by the <a href="https://corefork.telegram.org/api/config#client-configuration">client configuration</a>.</param>
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> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.sendReaction#possible-errors">details</a>)</para></summary>
/// <summary>React to a story. <para>See <a href="https://corefork.telegram.org/method/stories.sendReaction"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.sendReaction#possible-errors">details</a>)</para></summary>
/// <param name="add_to_recent">Whether to add this reaction to the <a href="https://corefork.telegram.org/api/reactions#recent-reactions">recent reactions list »</a>.</param>
/// <param name="peer">The peer that sent the story</param>
/// <param name="story_id">ID of the story to react to</param>
/// <param name="reaction">Reaction</param>
public static Task<UpdatesBase> Stories_SendReaction(this Client client, InputPeer peer, int story_id, Reaction reaction, bool add_to_recent = false)
=> client.Invoke(new Stories_SendReaction
{
@ -5853,14 +5866,17 @@ namespace TL
hidden = hidden,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.getBoostsStatus"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.getBoostsStatus#possible-errors">details</a>)</para></summary>
/// <summary>Get the current <a href="https://corefork.telegram.org/api/stories#boosts">boost status</a> of a channel, see <a href="https://corefork.telegram.org/api/stories#boosts">here »</a> for more info on boosts. <para>See <a href="https://corefork.telegram.org/method/stories.getBoostsStatus"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.getBoostsStatus#possible-errors">details</a>)</para></summary>
/// <param name="peer">The channel</param>
public static Task<Stories_BoostsStatus> Stories_GetBoostsStatus(this Client client, InputPeer peer)
=> client.Invoke(new Stories_GetBoostsStatus
{
peer = peer,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.getBoostersList"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.getBoostersList#possible-errors">details</a>)</para></summary>
/// <summary>Obtain info about the users currently <a href="https://corefork.telegram.org/api/stories#boosts">boosting</a> a channel, see <a href="https://corefork.telegram.org/api/stories#boosts">here »</a> for more info about boosts. <para>See <a href="https://corefork.telegram.org/method/stories.getBoostersList"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.getBoostersList#possible-errors">details</a>)</para></summary>
/// <param name="peer">The channel.</param>
/// <param name="offset">Next offset for <a href="https://corefork.telegram.org/api/offsets">pagination</a>, obtained from the <c>next_offset</c> field of <see cref="Stories_BoostersList"/>.</param>
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a></param>
public static Task<Stories_BoostersList> Stories_GetBoostersList(this Client client, InputPeer peer, string offset, int limit = int.MaxValue)
=> client.Invoke(new Stories_GetBoostersList
@ -5870,14 +5886,16 @@ namespace TL
limit = limit,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.canApplyBoost"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.canApplyBoost#possible-errors">details</a>)</para></summary>
/// <summary>Check whether a channel can be <a href="https://corefork.telegram.org/api/stories#boosts">boosted, see here for more info »</a>. <para>See <a href="https://corefork.telegram.org/method/stories.canApplyBoost"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.canApplyBoost#possible-errors">details</a>)</para></summary>
/// <param name="peer">The channel to boost.</param>
public static Task<Stories_CanApplyBoostResult> Stories_CanApplyBoost(this Client client, InputPeer peer)
=> client.Invoke(new Stories_CanApplyBoost
{
peer = peer,
});
/// <summary><para>See <a href="https://corefork.telegram.org/method/stories.applyBoost"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.applyBoost#possible-errors">details</a>)</para></summary>
/// <summary><a href="https://corefork.telegram.org/api/stories#boosts">Boost »</a> a <a href="https://corefork.telegram.org/api/channel">channel</a>, leveling it up and granting it permission to post <a href="https://corefork.telegram.org/api/stories">stories »</a>. <para>See <a href="https://corefork.telegram.org/method/stories.applyBoost"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stories.applyBoost#possible-errors">details</a>)</para></summary>
/// <param name="peer">The channel to boost.</param>
public static Task<bool> Stories_ApplyBoost(this Client client, InputPeer peer)
=> client.Invoke(new Stories_ApplyBoost
{