mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
API Layer 188: Channels_ClickSponsoredMessage, KeyboardButtonCopy, alt_documents
This commit is contained in:
parent
f0a649c147
commit
6cfa2a4da6
|
|
@ -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://buymeacoffee.com/wizou)
|
||||
|
|
|
|||
|
|
@ -1973,7 +1973,7 @@ namespace TL
|
|||
[TLDef(0x9F84F49E)]
|
||||
public sealed partial class MessageMediaUnsupported : MessageMedia { }
|
||||
/// <summary>Document (video, audio, voice, sticker, any media type except photo) <para>See <a href="https://corefork.telegram.org/constructor/messageMediaDocument"/></para></summary>
|
||||
[TLDef(0x4CF4D72D)]
|
||||
[TLDef(0xDD570BD5)]
|
||||
public sealed partial class MessageMediaDocument : MessageMedia
|
||||
{
|
||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||
|
|
@ -1981,7 +1981,7 @@ namespace TL
|
|||
/// <summary>Attached document</summary>
|
||||
[IfFlag(0)] public DocumentBase document;
|
||||
/// <summary>Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than <c>document</c>.</summary>
|
||||
[IfFlag(5)] public DocumentBase alt_document;
|
||||
[IfFlag(5)] public DocumentBase[] alt_documents;
|
||||
/// <summary>Time to live of self-destructing document</summary>
|
||||
[IfFlag(2)] public int ttl_seconds;
|
||||
|
||||
|
|
@ -1995,8 +1995,8 @@ namespace TL
|
|||
nopremium = 0x8,
|
||||
/// <summary>Whether this media should be hidden behind a spoiler warning</summary>
|
||||
spoiler = 0x10,
|
||||
/// <summary>Field <see cref="alt_document"/> has a value</summary>
|
||||
has_alt_document = 0x20,
|
||||
/// <summary>Field <see cref="alt_documents"/> has a value</summary>
|
||||
has_alt_documents = 0x20,
|
||||
/// <summary>Whether this is a video.</summary>
|
||||
video = 0x40,
|
||||
/// <summary>Whether this is a round video.</summary>
|
||||
|
|
@ -6901,7 +6901,7 @@ namespace TL
|
|||
}
|
||||
}
|
||||
/// <summary>Defines a video <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeVideo"/></para></summary>
|
||||
[TLDef(0x17399FAD)]
|
||||
[TLDef(0x43C57C48)]
|
||||
public sealed partial class DocumentAttributeVideo : DocumentAttribute
|
||||
{
|
||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||
|
|
@ -6916,6 +6916,7 @@ namespace TL
|
|||
[IfFlag(2)] public int preload_prefix_size;
|
||||
/// <summary>Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail.</summary>
|
||||
[IfFlag(4)] public double video_start_ts;
|
||||
[IfFlag(5)] public string video_codec;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
|
|
@ -6929,6 +6930,8 @@ namespace TL
|
|||
nosound = 0x8,
|
||||
/// <summary>Field <see cref="video_start_ts"/> has a value</summary>
|
||||
has_video_start_ts = 0x10,
|
||||
/// <summary>Field <see cref="video_codec"/> has a value</summary>
|
||||
has_video_codec = 0x20,
|
||||
}
|
||||
}
|
||||
/// <summary>Represents an audio file <para>See <a href="https://corefork.telegram.org/constructor/documentAttributeAudio"/></para></summary>
|
||||
|
|
@ -7866,6 +7869,12 @@ namespace TL
|
|||
/// <summary>Button text</summary>
|
||||
public override string Text => text;
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/keyboardButtonCopy"/></para></summary>
|
||||
[TLDef(0x75D2698E, inheritBefore = true)]
|
||||
public sealed partial class KeyboardButtonCopy : KeyboardButton
|
||||
{
|
||||
public string copy_text;
|
||||
}
|
||||
|
||||
/// <summary>Inline keyboard row <para>See <a href="https://corefork.telegram.org/constructor/keyboardButtonRow"/></para></summary>
|
||||
[TLDef(0x77608B83)]
|
||||
|
|
|
|||
|
|
@ -5352,9 +5352,10 @@ namespace TL
|
|||
/// <summary>Informs the server that the user has either: <para>See <a href="https://corefork.telegram.org/method/channels.clickSponsoredMessage"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.clickSponsoredMessage#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="channel">Channel where the sponsored message was posted</param>
|
||||
/// <param name="random_id">Message ID</param>
|
||||
public static Task<bool> Channels_ClickSponsoredMessage(this Client client, InputChannelBase channel, byte[] random_id)
|
||||
public static Task<bool> Channels_ClickSponsoredMessage(this Client client, InputChannelBase channel, byte[] random_id, bool media = false, bool fullscreen = false)
|
||||
=> client.Invoke(new Channels_ClickSponsoredMessage
|
||||
{
|
||||
flags = (Channels_ClickSponsoredMessage.Flags)((media ? 0x1 : 0) | (fullscreen ? 0x2 : 0)),
|
||||
channel = channel,
|
||||
random_id = random_id,
|
||||
});
|
||||
|
|
@ -11570,11 +11571,18 @@ namespace TL.Methods
|
|||
public bool enabled;
|
||||
}
|
||||
|
||||
[TLDef(0x18AFBC93)]
|
||||
[TLDef(0x01445D75)]
|
||||
public sealed partial class Channels_ClickSponsoredMessage : IMethod<bool>
|
||||
{
|
||||
public Flags flags;
|
||||
public InputChannelBase channel;
|
||||
public byte[] random_id;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
media = 0x1,
|
||||
fullscreen = 0x2,
|
||||
}
|
||||
}
|
||||
|
||||
[TLDef(0xD8AA3671)]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace TL
|
|||
{
|
||||
public static partial class Layer
|
||||
{
|
||||
public const int Version = 187; // fetched 07/09/2024 00:00:28
|
||||
public const int Version = 188; // fetched 19/09/2024 11:16:22
|
||||
internal const int SecretChats = 144;
|
||||
internal const int MTProto2 = 73;
|
||||
internal const uint VectorCtor = 0x1CB5C415;
|
||||
|
|
@ -155,7 +155,7 @@ namespace TL
|
|||
[0x56E0D474] = typeof(MessageMediaGeo),
|
||||
[0x70322949] = typeof(MessageMediaContact),
|
||||
[0x9F84F49E] = typeof(MessageMediaUnsupported),
|
||||
[0x4CF4D72D] = typeof(MessageMediaDocument),
|
||||
[0xDD570BD5] = typeof(MessageMediaDocument),
|
||||
[0xDDF10C3B] = typeof(MessageMediaWebPage),
|
||||
[0x2EC0533F] = typeof(MessageMediaVenue),
|
||||
[0xFDB19008] = typeof(MessageMediaGame),
|
||||
|
|
@ -513,7 +513,7 @@ namespace TL
|
|||
[0x6C37C15C] = typeof(DocumentAttributeImageSize),
|
||||
[0x11B58939] = typeof(DocumentAttributeAnimated),
|
||||
[0x6319D612] = typeof(DocumentAttributeSticker),
|
||||
[0x17399FAD] = typeof(DocumentAttributeVideo),
|
||||
[0x43C57C48] = typeof(DocumentAttributeVideo),
|
||||
[0x9852F9C6] = typeof(DocumentAttributeAudio),
|
||||
[0x15590068] = typeof(DocumentAttributeFilename),
|
||||
[0x9801D2F7] = typeof(DocumentAttributeHasStickers),
|
||||
|
|
@ -573,6 +573,7 @@ namespace TL
|
|||
[0xA0C0505C] = typeof(KeyboardButtonSimpleWebView),
|
||||
[0x53D7BFD8] = typeof(KeyboardButtonRequestPeer),
|
||||
[0xC9662D05] = typeof(InputKeyboardButtonRequestPeer),
|
||||
[0x75D2698E] = typeof(KeyboardButtonCopy),
|
||||
[0x77608B83] = typeof(KeyboardButtonRow),
|
||||
[0xA03E5B85] = typeof(ReplyKeyboardHide),
|
||||
[0x86B40B08] = typeof(ReplyKeyboardForceReply),
|
||||
|
|
|
|||
|
|
@ -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: 187
|
||||
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 188
|
||||
|
||||
Release Notes:
|
||||
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>
|
||||
|
|
|
|||
Loading…
Reference in a new issue