From 9b7e4293d877f680347f7d69da69078781758204 Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Thu, 11 Aug 2022 19:39:18 +0200
Subject: [PATCH] Removed compatibility with legacy (pre-2.0.0) session files
---
.github/dev.yml | 2 +-
EXAMPLES.md | 3 +-
src/Client.Helpers.cs | 2 +-
src/Session.cs | 1 -
src/TL.Schema.cs | 218 +++++++++++++++++++++++++++++++-----------
src/TL.SchemaFuncs.cs | 157 ++++++++++++++++++------------
6 files changed, 263 insertions(+), 120 deletions(-)
diff --git a/.github/dev.yml b/.github/dev.yml
index 34d9eb6..052762e 100644
--- a/.github/dev.yml
+++ b/.github/dev.yml
@@ -2,7 +2,7 @@ pr: none
trigger:
- master
-name: 2.6.2-dev.$(Rev:r)
+name: 2.6.3-dev.$(Rev:r)
pool:
vmImage: ubuntu-latest
diff --git a/EXAMPLES.md b/EXAMPLES.md
index e0ac068..5f0bc5f 100644
--- a/EXAMPLES.md
+++ b/EXAMPLES.md
@@ -49,7 +49,8 @@ var entities = client.HtmlToEntities(ref text);
var sent = await client.SendMessageAsync(InputPeer.Self, text, entities: entities);
// if you need to convert a sent/received Message to HTML: (easier to store)
text = client.EntitiesToHtml(sent.message, sent.entities);
-
+```
+```csharp
// Markdown-style text:
var text2 = $"Hello __dear *{Markdown.Escape(myself.first_name)}*__\n" +
"Enjoy this `userbot` written with [WTelegramClient](https://github.com/wiz0u/WTelegramClient)";
diff --git a/src/Client.Helpers.cs b/src/Client.Helpers.cs
index 7d4ea98..796d9a0 100644
--- a/src/Client.Helpers.cs
+++ b/src/Client.Helpers.cs
@@ -175,7 +175,7 @@ namespace WTelegram
/// The plain text of the message (or media caption)
/// An instance of InputMedia-derived class, or if there is no associated media
/// Your message is a reply to an existing message with this ID, in the same chat
- /// Text formatting entities. You can use MarkdownToEntities to create these
+ /// Text formatting entities. You can use HtmlToEntities or MarkdownToEntities to create these
/// UTC timestamp when the message should be sent
/// Should website/media preview be shown or not, for URLs in your message
/// The transmitted message as confirmed by Telegram
diff --git a/src/Session.cs b/src/Session.cs
index dee39b2..71c2e7d 100644
--- a/src/Session.cs
+++ b/src/Session.cs
@@ -168,7 +168,6 @@ namespace WTelegram
{
var position = BinaryPrimitives.ReadInt32LittleEndian(_header);
var length = BinaryPrimitives.ReadInt32LittleEndian(_header.AsSpan(4));
- if (position < 0 || length < 0 || position >= 65536 || length >= 32768) { position = 0; length = (int)base.Length; }
base.Position = position;
Length = length;
_nextPosition = position + length;
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index b4e24b1..34d84b3 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -776,6 +776,7 @@ namespace TL
/// If set, this user was reported by many users as a fake or scam user: be careful when interacting with them.
fake = 0x4000000,
bot_attach_menu = 0x8000000,
+ /// Whether this user is a Telegram Premium user
premium = 0x10000000,
attach_menu_enabled = 0x20000000,
}
@@ -993,7 +994,9 @@ namespace TL
gigagroup = 0x4000000,
/// Whether this channel or group is protected, thus does not allow forwarding messages from it
noforwards = 0x8000000,
+ /// Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using channels.toggleJoinToSend
join_to_send = 0x10000000,
+ /// Whether a user's join request will have to be approved by administrators, toggle using channels.toggleJoinToSend
join_request = 0x20000000,
}
@@ -1173,6 +1176,7 @@ namespace TL
{
/// Flags, see TL conditional fields
public Flags flags;
+ /// Flags, see TL conditional fields
public Flags2 flags2;
/// ID of the channel
public long id;
@@ -1313,6 +1317,7 @@ namespace TL
[Flags] public enum Flags2 : uint
{
+ /// Can we delete this channel?
can_delete_channel = 0x1,
}
@@ -1725,6 +1730,7 @@ namespace TL
has_document = 0x1,
/// Field has a value
has_ttl_seconds = 0x4,
+ /// Whether this is a normal sticker, if not set this is a premium sticker and a premium sticker animation must be played.
nopremium = 0x8,
}
}
@@ -1834,7 +1840,7 @@ namespace TL
public string emoticon;
}
- /// Object describing actions connected to a service message. Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , See
+ /// Object describing actions connected to a service message. Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , See
/// a null value means messageActionEmpty
public abstract class MessageAction : IObject { }
/// Group created See
@@ -1955,17 +1961,20 @@ namespace TL
[TLDef(0x96163F56)]
public class MessageActionPaymentSent : MessageAction
{
+ /// Flags, see TL conditional fields
public Flags flags;
/// Three-letter ISO 4217 currency code
public string currency;
/// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
public long total_amount;
+ /// An invoice slug taken from a t.me/invoice/ link or from the premium_invoice_slug app config parameter »
[IfFlag(0)] public string invoice_slug;
[Flags] public enum Flags : uint
{
/// Field has a value
has_invoice_slug = 0x1,
+ /// Whether this is a recurring payment
recurring_init = 0x4,
recurring_used = 0x8,
}
@@ -2104,12 +2113,15 @@ namespace TL
{
public string text;
}
- /// See
+ /// Info about a gifted Telegram Premium subscription See
[TLDef(0xABA0F5C6)]
public class MessageActionGiftPremium : MessageAction
{
+ /// Three-letter ISO 4217 currency code
public string currency;
+ /// Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
public long amount;
+ /// Duration of the gifted Telegram Premium subscription
public int months;
}
@@ -2485,8 +2497,11 @@ namespace TL
[IfFlag(1)] public bool silent;
/// Mute all notifications until this date
[IfFlag(2)] public int mute_until;
+ /// Notification sound for the official iOS application
[IfFlag(3)] public NotificationSound ios_sound;
+ /// Notification sound for the official android application
[IfFlag(4)] public NotificationSound android_sound;
+ /// Notification sound for other applications
[IfFlag(5)] public NotificationSound other_sound;
[Flags] public enum Flags : uint
@@ -2672,7 +2687,9 @@ namespace TL
[IfFlag(15)] public string theme_emoticon;
/// Anonymized text to be shown instead of the the user's name on forwarded messages
[IfFlag(16)] public string private_forward_name;
+ /// A suggested default set of administrator rights for the bot, to be shown when adding the bot as admin to a supergroup (only a suggestion, the admin right set may be modified by the user before adding the bot as admin)
[IfFlag(17)] public ChatAdminRights bot_group_admin_rights;
+ /// A suggested default set of administrator rights for the bot, to be shown when adding the bot as admin to a channel (only a suggestion, the admin right set may be modified by the user before adding the bot as admin)
[IfFlag(18)] public ChatAdminRights bot_broadcast_admin_rights;
[IfFlag(19)] public PremiumGiftOption[] premium_gifts;
@@ -2712,6 +2729,7 @@ namespace TL
has_bot_broadcast_admin_rights = 0x40000,
/// Field has a value
has_premium_gifts = 0x80000,
+ /// Whether this user doesn't allow sending voice messages in a private chat with them
voice_messages_forbidden = 0x100000,
}
}
@@ -3038,7 +3056,7 @@ namespace TL
[TLDef(0x1BB00451)]
public class InputMessagesFilterPinned : MessagesFilter { }
- /// Object contains info on events occurred. Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , See
+ /// Object contains info on events occurred. Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , See
public abstract class Update : IObject { }
/// New message in a private chat or in a basic group. See
[TLDef(0x1F2B0AFD)]
@@ -3405,6 +3423,7 @@ namespace TL
{
/// Whether the updated stickers are mask stickers
masks = 0x1,
+ /// Whether the updated stickers are custom emoji stickers
emojis = 0x2,
}
}
@@ -4171,7 +4190,7 @@ namespace TL
/// Reactions
public MessageReactions reactions;
}
- /// See
+ /// The list of added bot web apps » has changed, use messages.getAttachMenuBots to fetch the updated list. See
[TLDef(0x17B7A20B)]
public class UpdateAttachMenuBots : Update { }
/// See
@@ -4180,28 +4199,36 @@ namespace TL
{
public long query_id;
}
- /// See
+ /// The menu button behavior for the specified bot has changed See
[TLDef(0x14B85813)]
public class UpdateBotMenuButton : Update
{
+ /// Bot ID
public long bot_id;
+ /// New menu button
public BotMenuButtonBase button;
}
- /// See
+ /// The list of saved notification sounds has changed, use account.getSavedRingtones to fetch the new list. See
[TLDef(0x74D8BE99)]
public class UpdateSavedRingtones : Update { }
- /// See
+ /// A pending transcription initiated with messages.transcribeAudio was updated. See
[TLDef(0x0084CD5A)]
public class UpdateTranscribedAudio : Update
{
+ /// Flags, see TL conditional fields
public Flags flags;
+ /// Peer of the transcribed message
public Peer peer;
+ /// Transcribed message ID
public int msg_id;
+ /// Transcription ID
public long transcription_id;
+ /// Transcribed text
public string text;
[Flags] public enum Flags : uint
{
+ /// Whether this transcription is still pending and further about it will be sent in the future.
pending = 0x1,
}
}
@@ -4757,6 +4784,7 @@ namespace TL
has_static_maps_provider = 0x1000,
/// Whether pfs was used
pfs_enabled = 0x2000,
+ /// Whether to forcefully try connecting using IPv6
force_try_ipv6 = 0x4000,
}
}
@@ -5310,7 +5338,7 @@ namespace TL
PhoneNumber = 0x0352DAFA,
///Whether people can add you to their contact list by your phone number
AddedByPhone = 0xD1219BDD,
- ///See
+ ///Whether people can send you voice messages
VoiceMessages = 0xAEE69D68,
}
@@ -5333,7 +5361,7 @@ namespace TL
PhoneNumber = 0xD19AE46D,
///Whether people can add you to their contact list by your phone number
AddedByPhone = 0x42FFD42B,
- ///See
+ ///Whether the user accepts voice messages
VoiceMessages = 0x0697F414,
}
@@ -5445,7 +5473,7 @@ namespace TL
public int days;
}
- /// Various possible attributes of a document (used to define if it's a sticker, a GIF, a video, a mask sticker, an image, an audio, and so on) Derived classes: , , , , , , See
+ /// Various possible attributes of a document (used to define if it's a sticker, a GIF, a video, a mask sticker, an image, an audio, and so on) Derived classes: , , , , , , , See
public abstract class DocumentAttribute : IObject { }
/// Defines the width and height of an image uploaded as document See
[TLDef(0x6C37C15C)]
@@ -5538,12 +5566,15 @@ namespace TL
/// Whether the current document has stickers attached See
[TLDef(0x9801D2F7)]
public class DocumentAttributeHasStickers : DocumentAttribute { }
- /// See
+ /// Info about a custom emoji See
[TLDef(0xFD149899)]
public class DocumentAttributeCustomEmoji : DocumentAttribute
{
+ /// Flags, see TL conditional fields
public Flags flags;
+ /// The actual emoji
public string alt;
+ /// The emoji stickerset to which this emoji belongs.
public InputStickerSet stickerset;
[Flags] public enum Flags : uint
@@ -5878,7 +5909,7 @@ namespace TL
public int flags;
}
- /// Exported chat invite Derived classes: See
+ /// Exported chat invite Derived classes: , See
public abstract class ExportedChatInvite : IObject { }
/// Exported chat invite See
[TLDef(0x0AB4A819)]
@@ -5985,7 +6016,7 @@ namespace TL
public DateTime expires;
}
- /// Represents a stickerset Derived classes: , , , , See
+ /// Represents a stickerset Derived classes: , , , , , See
/// a null value means inputStickerSetEmpty
public abstract partial class InputStickerSet : IObject { }
/// Stickerset by ID See
@@ -6043,6 +6074,7 @@ namespace TL
[IfFlag(4)] public int thumb_dc_id;
/// Thumbnail version
[IfFlag(4)] public int thumb_version;
+ /// Document ID of custom emoji thumbnail, fetch the document using messages.getCustomEmojiDocuments
[IfFlag(8)] public long thumb_document_id;
/// Number of stickers in pack
public int count;
@@ -6065,6 +6097,7 @@ namespace TL
animated = 0x20,
/// Is this a video stickerpack
videos = 0x40,
+ /// This is a custom emoji stickerset
emojis = 0x80,
/// Field has a value
has_thumb_document_id = 0x100,
@@ -6098,15 +6131,19 @@ namespace TL
[TLDef(0x8F300B57)]
public class BotInfo : IObject
{
+ /// Flags, see TL conditional fields
public Flags flags;
/// ID of the bot
[IfFlag(0)] public long user_id;
/// Description of the bot
[IfFlag(1)] public string description;
+ /// Description photo
[IfFlag(4)] public PhotoBase description_photo;
+ /// Description animation in MPEG4 format
[IfFlag(5)] public DocumentBase description_document;
/// Bot commands that can be used in the chat
[IfFlag(2)] public BotCommand[] commands;
+ /// Indicates the action to execute when pressing the in-UI menu button for bots
[IfFlag(3)] public BotMenuButtonBase menu_button;
[Flags] public enum Flags : uint
@@ -6126,7 +6163,7 @@ namespace TL
}
}
- /// Bot or inline keyboard buttons Derived classes: , , , , , , , , , , , , See
+ /// Bot or inline keyboard buttons Derived classes: , , , , , , , , , , , , , , See
public abstract class KeyboardButtonBase : IObject
{
/// Button text
@@ -6378,12 +6415,12 @@ namespace TL
public KeyboardButtonRow[] rows;
}
- /// Message entities, representing styled text in a message Derived classes: , , , , , , , , , , , , , , , , , , , See
+ /// Message entities, representing styled text in a message Derived classes: , , , , , , , , , , , , , , , , , , , , See
public abstract class MessageEntity : IObject
{
- /// Offset of message entity within message (in UTF-8 codepoints)
+ /// Offset of message entity within message (in UTF-16 code units)
public int offset;
- /// Length of message entity within message (in UTF-8 codepoints)
+ /// Length of message entity within message (in UTF-16 code units)
public int length;
}
/// Unknown message entity See
@@ -6462,10 +6499,11 @@ namespace TL
/// Message entity representing a spoiler See
[TLDef(0x32CA960F)]
public class MessageEntitySpoiler : MessageEntity { }
- /// See
+ /// Represents a custom emoji See
[TLDef(0xC8CF05F8, inheritBefore = true)]
public class MessageEntityCustomEmoji : MessageEntity
{
+ /// Document ID of the custom emoji, use messages.getCustomEmojiDocuments to fetch the emoji animation and the actual emoji it represents.
public long document_id;
}
@@ -7778,6 +7816,7 @@ namespace TL
[TLDef(0xBE382906)]
public class Messages_FeaturedStickers : Messages_FeaturedStickersBase
{
+ /// Flags, see TL conditional fields
public Flags flags;
/// Hash for pagination, for more info click here
public long hash;
@@ -7790,6 +7829,7 @@ namespace TL
[Flags] public enum Flags : uint
{
+ /// Whether this is a premium stickerset
premium = 0x1,
}
}
@@ -7832,7 +7872,7 @@ namespace TL
public StickerSetCoveredBase[] sets;
}
- /// Stickerset, with a specific sticker as preview Derived classes: , See
+ /// Stickerset, with a specific sticker as preview Derived classes: , , See
public abstract class StickerSetCoveredBase : IObject
{
/// Stickerset
@@ -7850,7 +7890,7 @@ namespace TL
/// Stickerset
public override StickerSet Set => set;
}
- /// Stickerset, with a specific stickers as preview See
+ /// Stickerset, with a specific set of stickers as preview See
[TLDef(0x3407E51B)]
public class StickerSetMultiCovered : StickerSetCoveredBase
{
@@ -8453,6 +8493,7 @@ namespace TL
[IfFlag(8)] public long max_tip_amount;
/// A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
[IfFlag(8)] public long[] suggested_tip_amounts;
+ /// Terms of service URL for the recurring payment
[IfFlag(9)] public string recurring_terms_url;
[Flags] public enum Flags : uint
@@ -8475,6 +8516,7 @@ namespace TL
email_to_provider = 0x80,
/// Field has a value
has_max_tip_amount = 0x100,
+ /// Whether this is a recurring payment
recurring = 0x200,
}
}
@@ -8620,7 +8662,7 @@ namespace TL
public DocumentAttribute[] attributes;
}
- /// Location of remote file Derived classes: , See
+ /// Location of remote file Derived classes: , , See
public abstract class InputWebFileLocationBase : IObject { }
/// Location of a remote HTTP(s) file See
[TLDef(0xC239D686)]
@@ -8652,6 +8694,7 @@ namespace TL
[TLDef(0xF46FE924)]
public class InputWebFileAudioAlbumThumbLocation : InputWebFileLocationBase
{
+ /// Flags, see TL conditional fields
public Flags flags;
[IfFlag(0)] public InputDocument document;
[IfFlag(1)] public string title;
@@ -8659,7 +8702,9 @@ namespace TL
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_document = 0x1,
+ /// Field has a value
has_title = 0x2,
small = 0x4,
}
@@ -8691,8 +8736,11 @@ namespace TL
public long form_id;
/// Bot ID
public long bot_id;
+ /// Form title
public string title;
+ /// Description
public string description;
+ /// Product photo
[IfFlag(5)] public WebDocumentBase photo;
/// Invoice
public Invoice invoice;
@@ -8704,6 +8752,7 @@ namespace TL
[IfFlag(4)] public string native_provider;
/// Contains information about the payment provider, if available, to support it natively without the need for opening the URL.
A JSON object that can contain the following fields:
- apple_pay_merchant_id: Apple Pay merchant ID
- google_pay_public_key: Google Pay public key
- need_country: True, if the user country must be provided,
- need_zip: True, if the user ZIP/postal code must be provided,
- need_cardholder_name: True, if the cardholder name must be provided
[IfFlag(4)] public DataJSON native_params;
+ /// Additional payment methods
[IfFlag(6)] public PaymentFormMethod[] additional_methods;
/// Saved server-side order information
[IfFlag(0)] public PaymentRequestedInfo saved_info;
@@ -9120,6 +9169,7 @@ namespace TL
[TLDef(0x9CC123C7)]
public class PhoneConnection : PhoneConnectionBase
{
+ /// Flags, see TL conditional fields
public Flags flags;
/// Endpoint ID
public long id;
@@ -9134,6 +9184,7 @@ namespace TL
[Flags] public enum Flags : uint
{
+ /// Whether TCP should be used
tcp = 0x1,
}
@@ -11584,7 +11635,7 @@ namespace TL
public BankCardOpenUrl[] open_urls;
}
- /// Dialog filter (folders) Derived classes: See
+ /// Dialog filter (folder ») Derived classes: , See
public abstract class DialogFilterBase : IObject { }
/// Dialog filter AKA folder See
[TLDef(0x7438F7E8)]
@@ -12058,6 +12109,7 @@ namespace TL
has_reply_to_peer_id = 0x1,
/// Field has a value
has_reply_to_top_id = 0x2,
+ /// Whether this message replies to a scheduled message
reply_to_scheduled = 0x4,
}
}
@@ -12879,6 +12931,7 @@ namespace TL
inactive = 0x1,
/// Field has a value
has_around_animation = 0x2,
+ /// Whether this reaction can only be used by Telegram Premium users
premium = 0x4,
}
}
@@ -12957,65 +13010,84 @@ namespace TL
public string key;
}
- /// See
+ /// Represents an attachment menu icon color for bot web apps » See
[TLDef(0x4576F3F0)]
public class AttachMenuBotIconColor : IObject
{
+ /// One of the following values:
light_icon - Color of the attachment menu icon (light mode)
light_text - Color of the attachment menu label, once selected (light mode)
dark_icon - Color of the attachment menu icon (dark mode)
dark_text - Color of the attachment menu label, once selected (dark mode)
public string name;
+ /// Color in RGB24 format
public int color;
}
- /// See
+ /// Represents an attachment menu icon for bot web apps » See
[TLDef(0xB2A7386B)]
public class AttachMenuBotIcon : IObject
{
+ /// Flags, see TL conditional fields
public Flags flags;
+ /// One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot web app.
default_static - Default attachment menu icon in SVG format
placeholder_static - Default placeholder for opened Web Apps in SVG format
ios_static - Attachment menu icon in SVG format for the official iOS app
ios_animated - Animated attachment menu icon in TGS format for the official iOS app
android_animated - Animated attachment menu icon in TGS format for the official Android app
macos_animated - Animated attachment menu icon in TGS format for the official native Mac OS app
public string name;
+ /// The actual icon file.
public DocumentBase icon;
+ /// Attachment menu icon colors.
[IfFlag(0)] public AttachMenuBotIconColor[] colors;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_colors = 0x1,
}
}
- /// See
+ /// Represents a bot web app that can be launched from the attachment menu » See
[TLDef(0xC8AA2CD2)]
public class AttachMenuBot : IObject
{
+ /// Flags, see TL conditional fields
public Flags flags;
+ /// Bot ID
public long bot_id;
+ /// Attachment menu item name
public string short_name;
+ /// List of peer types where this attachment should be shown
public AttachMenuPeerType[] peer_types;
+ /// Attachment menu icon
public AttachMenuBotIcon[] icons;
[Flags] public enum Flags : uint
{
+ /// Whether this bot attachment menu entry should be shown in the attachment menu (toggle using messages.toggleBotInAttachMenu)
inactive = 0x1,
+ /// True, if the bot supports the "settings_button_pressed" event
has_settings = 0x2,
}
}
- /// See
+ /// Represents a list of bot web apps that can be launched from the attachment menu » See
/// a null value means attachMenuBotsNotModified
[TLDef(0x3C4301C0)]
public class AttachMenuBots : IObject
{
+ /// Hash for pagination, for more info click here
public long hash;
+ /// List of bot web apps that can be launched from the attachment menu »
public AttachMenuBot[] bots;
+ /// Info about related users/bots
public Dictionary users;
}
- /// See
+ /// Represents a bot web app that can be launched from the attachment menu » See
[TLDef(0x93BF667F)]
public class AttachMenuBotsBot : IObject
{
+ /// Represents a bot web app that can be launched from the attachment menu »
public AttachMenuBot bot;
+ /// Info about related users and bots
public Dictionary users;
}
- /// See
+ /// Contains information about a Web App Derived classes: See
public abstract class WebViewResult : IObject { }
/// See
[TLDef(0x0C14557C)]
@@ -13025,7 +13097,7 @@ namespace TL
public string url;
}
- /// See
+ /// Contains the webview URL with appropriate theme and user info parameters added Derived classes: See
public abstract class SimpleWebViewResult : IObject { }
/// See
[TLDef(0x882F76BB)]
@@ -13038,16 +13110,18 @@ namespace TL
[TLDef(0x0C94511C)]
public class WebViewMessageSent : IObject
{
+ /// Flags, see TL conditional fields
public Flags flags;
[IfFlag(0)] public InputBotInlineMessageIDBase msg_id;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_msg_id = 0x1,
}
}
- /// See
+ /// Indicates the action to execute when pressing the in-UI menu button for bots Derived classes: , , See
public abstract class BotMenuButtonBase : IObject { }
/// See
[TLDef(0x7533A588)]
@@ -13055,126 +13129,150 @@ namespace TL
/// See
[TLDef(0x4258C205)]
public class BotMenuButtonCommands : BotMenuButtonBase { }
- /// See
+ /// Indicates the action to execute when pressing the in-UI menu button for bots See
[TLDef(0xC7B57CE6)]
public class BotMenuButton : BotMenuButtonBase
{
+ /// Title to be displayed on the menu button instead of 'Menu'
public string text;
+ /// URL of a web app to open when the user clicks on the button
public string url;
}
- /// See
+ /// A list of saved notification sounds See
/// a null value means account.savedRingtonesNotModified
[TLDef(0xC1E92CC5)]
public class Account_SavedRingtones : IObject
{
+ /// Hash for pagination, for more info click here
public long hash;
+ /// Saved notification sounds
public DocumentBase[] ringtones;
}
- /// See
+ /// Represents a notification sound Derived classes: , , , See
public abstract class NotificationSound : IObject { }
- /// See
+ /// Indicates the default notification sound should be used See
[TLDef(0x97E8BEBE)]
public class NotificationSoundDefault : NotificationSound { }
- /// See
+ /// No notification sound should be used See
[TLDef(0x6F0C34DF)]
public class NotificationSoundNone : NotificationSound { }
- /// See
+ /// Indicates a specific local notification sound should be used See
[TLDef(0x830B9AE4)]
public class NotificationSoundLocal : NotificationSound
{
+ /// Notification sound title
public string title;
+ /// Notification sound identifier (arbitrary data used by the client to identify a specific local notification sound)
public string data;
}
- /// See
+ /// A specific previously uploaded notification sound should be used See
[TLDef(0xFF6C8049)]
public class NotificationSoundRingtone : NotificationSound
{
+ /// Document ID of notification sound uploaded using account.uploadRingtone
public long id;
}
- /// See
+ /// The notification sound was already in MP3 format and was saved without any modification See
[TLDef(0xB7263F6D)]
public class Account_SavedRingtone : IObject { }
- /// See
+ /// The notification sound was not in MP3 format and was successfully converted and saved, use the returned to refer to the notification sound from now on See
[TLDef(0x1F307EB7)]
public class Account_SavedRingtoneConverted : Account_SavedRingtone
{
+ /// The converted notification sound
public DocumentBase document;
}
- /// See
+ /// Indicates a supported peer type for a bot web app attachment menu See
public enum AttachMenuPeerType : uint
{
- ///See
+ ///The bot attachment menu entry is available in the chat with the bot that offers it
SameBotPM = 0x7D6BE90E,
- ///See
+ ///The bot attachment menu entry is available in private chats with other bots
BotPM = 0xC32BFA1A,
- ///See
+ ///The bot attachment menu entry is available in private chats with other users
PM = 0xF146D31F,
- ///See
+ ///The bot attachment menu entry is available in groups and supergroups
Chat = 0x0509113F,
- ///See
+ ///The bot attachment menu entry is available in channels
Broadcast = 0x7BFBDEFC,
}
- /// See
+ /// An invoice Derived classes: , See
public abstract class InputInvoice : IObject { }
- /// See
+ /// An invoice contained in a message. See
[TLDef(0xC5B56859)]
public class InputInvoiceMessage : InputInvoice
{
+ /// Chat where the invoice was sent
public InputPeer peer;
+ /// Message ID
public int msg_id;
}
- /// See
+ /// An invoice slug taken from a t.me/invoice/ link or from the premium_invoice_slug app config parameter » See
[TLDef(0xC326CAEF)]
public class InputInvoiceSlug : InputInvoice
{
+ /// The invoice slug
public string slug;
}
- /// See
+ /// Exported invoice See
[TLDef(0xAED0CBD9)]
public class Payments_ExportedInvoice : IObject
{
+ /// Exported invoice URL
public string url;
}
- /// See
+ /// Transcribed text from a voice message See
[TLDef(0x93752C52)]
public class Messages_TranscribedAudio : IObject
{
+ /// Flags, see TL conditional fields
public Flags flags;
+ /// Transcription ID
public long transcription_id;
+ /// Transcripted text
public string text;
[Flags] public enum Flags : uint
{
+ /// Whether the transcription is partial because audio transcription is still in progress, if set the user may receive further updates with the updated transcription.
pending = 0x1,
}
}
- /// See
+ /// Telegram Premium promotion information See
[TLDef(0x8A4F3C29)]
public class Help_PremiumPromo : IObject
{
+ /// Description of the current state of the user's Telegram Premium subscription
public string status_text;
+ /// Message entities for styled text
public MessageEntity[] status_entities;
+ /// A list of premium feature identifiers », associated to each video
public string[] video_sections;
+ /// A list of videos
public DocumentBase[] videos;
+ /// Three-letter ISO 4217 currency code
public string currency;
+ /// Monthly price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
public long monthly_amount;
+ /// Related user information
public Dictionary users;
}
- /// See
+ /// Info about a Telegram Premium purchase Derived classes: , See
public abstract class InputStorePaymentPurpose : IObject { }
- /// See
+ /// Info about a Telegram Premium purchase See
[TLDef(0xA6751E66)]
public class InputStorePaymentPremiumSubscription : InputStorePaymentPurpose
{
+ /// Flags, see TL conditional fields
public Flags flags;
[Flags] public enum Flags : uint
@@ -13182,33 +13280,41 @@ namespace TL
restore = 0x1,
}
}
- /// See
+ /// Info about a gifted Telegram Premium purchase See
[TLDef(0x616F7FE8)]
public class InputStorePaymentGiftPremium : InputStorePaymentPurpose
{
+ /// The user to which the Telegram Premium subscription was gifted
public InputUserBase user_id;
+ /// Three-letter ISO 4217 currency code
public string currency;
+ /// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
public long amount;
}
- /// See
+ /// Telegram Premium gift option See
[TLDef(0x74C34319)]
public class PremiumGiftOption : IObject
{
+ /// Flags, see TL conditional fields
public Flags flags;
+ /// Duration of gifted Telegram Premium subscription
public int months;
+ /// Three-letter ISO 4217 currency code
public string currency;
+ /// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
public long amount;
public string bot_url;
[IfFlag(0)] public string store_product;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_store_product = 0x1,
}
}
- /// See
+ /// Represents a payment method See
[TLDef(0x88F8F21B)]
public class PaymentFormMethod : IObject
{
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 9a6dfee..2dc4f09 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -337,7 +337,7 @@ namespace TL
{
});
- /// Updates user profile. See Possible codes: 400 (details)
+ /// Updates user profile. See Possible codes: 400,403 (details)
/// New user first name
/// New user last name
/// New bio
@@ -350,7 +350,7 @@ namespace TL
about = about,
});
- /// Updates online user status. See
+ /// Updates online user status. See Possible codes: 403 (details)
/// If is transmitted, user status will change to .
public static Task Account_UpdateStatus(this Client client, bool offline)
=> client.Invoke(new Account_UpdateStatus
@@ -686,13 +686,13 @@ namespace TL
code = code,
});
- /// Resend the code to verify an email to use as 2FA recovery method. See
+ /// Resend the code to verify an email to use as 2FA recovery method. See Possible codes: 400 (details)
public static Task Account_ResendPasswordEmail(this Client client)
=> client.Invoke(new Account_ResendPasswordEmail
{
});
- /// Cancel the code that was sent to verify an email to use as 2FA recovery method. See
+ /// Cancel the code that was sent to verify an email to use as 2FA recovery method. See Possible codes: 400 (details)
public static Task Account_CancelPasswordEmail(this Client client)
=> client.Invoke(new Account_CancelPasswordEmail
{
@@ -919,7 +919,7 @@ namespace TL
settings = settings,
});
- /// Report a profile photo of a dialog See
+ /// Report a profile photo of a dialog See Possible codes: 400 (details)
/// The dialog
/// Dialog photo ID
/// Report reason
@@ -975,7 +975,8 @@ namespace TL
call_requests_disabled = call_requests_disabled.GetValueOrDefault(),
});
- /// See
+ /// Fetch saved notification sounds See
+ /// Hash for pagination, for more info click here
/// a null value means account.savedRingtonesNotModified
public static Task Account_GetSavedRingtones(this Client client, long hash = default)
=> client.Invoke(new Account_GetSavedRingtones
@@ -983,7 +984,9 @@ namespace TL
hash = hash,
});
- /// See
+ /// Save or remove saved notification sound. See
+ /// Notification sound uploaded using account.uploadRingtone
+ /// Whether to add or delete the notification sound
public static Task Account_SaveRingtone(this Client client, InputDocument id, bool unsave)
=> client.Invoke(new Account_SaveRingtone
{
@@ -991,7 +994,10 @@ namespace TL
unsave = unsave,
});
- /// See
+ /// Upload notification sound, use account.saveRingtone to convert it and add it to the list of saved notification sounds. See
+ /// Notification sound
+ /// File name
+ /// MIME type of file
public static Task Account_UploadRingtone(this Client client, InputFileBase file, string file_name, string mime_type)
=> client.Invoke(new Account_UploadRingtone
{
@@ -1016,7 +1022,7 @@ namespace TL
id = id,
});
- /// Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). See [bots: ✓] Possible codes: 400 (details)
+ /// Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). See [bots: ✓] Possible codes: 400,403 (details)
/// The user
/// Errors
public static Task Users_SetSecureValueErrors(this Client client, InputUserBase id, params SecureValueErrorBase[] errors)
@@ -1217,7 +1223,7 @@ namespace TL
msg_id = msg_id,
});
- /// Resolve a phone number to get user info, if their privacy settings allow it. See
+ /// Resolve a phone number to get user info, if their privacy settings allow it. See Possible codes: (details)
/// Phone number in international format, possibly obtained from a t.me/+number or tg://resolve?phone=number URI.
public static Task Contacts_ResolvePhone(this Client client, string phone)
=> client.Invoke(new Contacts_ResolvePhone
@@ -1772,7 +1778,7 @@ namespace TL
stickerset = stickerset,
});
- /// Start a conversation with a bot using a deep linking parameter See Possible codes: 400,500 (details)
+ /// Start a conversation with a bot using a deep linking parameter See Possible codes: 400,403,500 (details)
/// The bot
/// The chat where to start the bot, can be the bot's private chat or a group
/// Random ID to avoid resending the same message
@@ -1845,6 +1851,7 @@ namespace TL
/// Reorder installed stickersets See
/// Reorder mask stickersets
+ /// Reorder custom emoji stickersets
/// New stickerset order by stickerset IDs
public static Task Messages_ReorderStickerSets(this Client client, long[] order, bool masks = false, bool emojis = false)
=> client.Invoke(new Messages_ReorderStickerSets
@@ -2106,6 +2113,7 @@ namespace TL
/// Get all archived stickers See
/// Get mask stickers
+ /// Get custom emoji stickers
/// Offsets for pagination, for more info click here
/// Maximum number of results to return, see pagination
public static Task Messages_GetArchivedStickers(this Client client, long offset_id = default, int limit = int.MaxValue, bool masks = false, bool emojis = false)
@@ -2730,7 +2738,7 @@ namespace TL
read_max_id = read_max_id,
});
- /// Unpin all pinned messages See [bots: ✓]
+ /// Unpin all pinned messages See [bots: ✓] Possible codes: 400 (details)
/// Chat where to unpin
public static Task Messages_UnpinAllMessages(this Client client, InputPeer peer)
=> client.Invoke(new Messages_UnpinAllMessages
@@ -2754,7 +2762,7 @@ namespace TL
flags = (Messages_DeletePhoneCallHistory.Flags)(revoke ? 0x1 : 0),
});
- /// Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ». See
+ /// Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ». See Possible codes: 400 (details)
/// Beginning of the message file; up to 100 lines.
public static Task Messages_CheckHistoryImport(this Client client, string import_head)
=> client.Invoke(new Messages_CheckHistoryImport
@@ -2799,7 +2807,7 @@ namespace TL
import_id = import_id,
});
- /// Get info about the chat invites of a specific chat See Possible codes: 400 (details)
+ /// Get info about the chat invites of a specific chat See Possible codes: 400,403 (details)
/// Whether to fetch revoked chat invites
/// Chat
/// Whether to only fetch chat invites from this admin
@@ -2817,7 +2825,7 @@ namespace TL
limit = limit,
});
- /// Get info about a chat invite See Possible codes: 400 (details)
+ /// Get info about a chat invite See Possible codes: 400,403 (details)
/// Chat
/// Invite link
public static Task Messages_GetExportedChatInvite(this Client client, InputPeer peer, string link)
@@ -2847,7 +2855,7 @@ namespace TL
title = title,
});
- /// Delete all revoked chat invites See
+ /// Delete all revoked chat invites See Possible codes: 400 (details)
/// Chat
/// ID of the admin that originally generated the revoked chat invites
public static Task Messages_DeleteRevokedExportedChatInvites(this Client client, InputPeer peer, InputUserBase admin_id)
@@ -2875,7 +2883,7 @@ namespace TL
peer = peer,
});
- /// Get info about the users that joined the chat using a specific chat invite See Possible codes: 400 (details)
+ /// Get info about the users that joined the chat using a specific chat invite See Possible codes: 400,403 (details)
/// If set, only returns info about users with pending join requests »
/// Chat
/// Invite link
@@ -2973,7 +2981,7 @@ namespace TL
user_id = user_id,
});
- /// Dismiss or approve all join requests related to a specific chat or channel. See
+ /// Dismiss or approve all join requests related to a specific chat or channel. See Possible codes: 400,403 (details)
/// Whether to dismiss or approve all chat join requests »
/// The chat or channel
/// Only dismiss or approve join requests » initiated using this invite link
@@ -3005,7 +3013,7 @@ namespace TL
send_as = send_as,
});
- /// React to message See Possible codes: 400 (details)
+ /// React to message See Possible codes: 400,403 (details)
/// Whether a bigger and longer reaction should be shown
/// Peer
/// Message ID to react to
@@ -3019,7 +3027,7 @@ namespace TL
reaction = reaction,
});
- /// Get message reactions » See [bots: ✓]
+ /// Get message reactions » See
/// Peer
/// Message IDs
public static Task Messages_GetMessagesReactions(this Client client, InputPeer peer, int[] id)
@@ -3029,7 +3037,7 @@ namespace TL
id = id,
});
- /// Get message reaction list, along with the sender of each reaction. See
+ /// Get message reaction list, along with the sender of each reaction. See Possible codes: 400,403 (details)
/// Peer
/// Message ID
/// Get only reactions of this type (UTF8 emoji)
@@ -3046,7 +3054,7 @@ namespace TL
limit = limit,
});
- /// Change the set of message reactions » that can be used in a certain group, supergroup or channel See
+ /// Change the set of message reactions » that can be used in a certain group, supergroup or channel See Possible codes: 400 (details)
/// Group where to apply changes
/// Allowed reaction emojis
public static Task Messages_SetChatAvailableReactions(this Client client, InputPeer peer, string[] available_reactions)
@@ -3073,7 +3081,7 @@ namespace TL
reaction = reaction,
});
- /// Translate a given text See [bots: ✓]
+ /// Translate a given text See Possible codes: 400 (details)
/// If the text is a chat message, the peer ID
/// If the text is a chat message, the message ID
/// The text to translate
@@ -3090,7 +3098,7 @@ namespace TL
to_lang = to_lang,
});
- /// Get unread reactions to messages you sent See [bots: ✓]
+ /// Get unread reactions to messages you sent See
/// Peer
/// Offsets for pagination, for more info click here
/// Offsets for pagination, for more info click here
@@ -3108,7 +3116,7 @@ namespace TL
min_id = min_id,
});
- /// Mark message reactions » as read See [bots: ✓]
+ /// Mark message reactions » as read See
/// Peer
public static Task Messages_ReadReactions(this Client client, InputPeer peer)
=> client.Invoke(new Messages_ReadReactions
@@ -3128,7 +3136,8 @@ namespace TL
limit = limit,
});
- /// See
+ /// Returns installed attachment menu bot web apps » See
+ /// Hash for pagination, for more info click here
/// a null value means attachMenuBotsNotModified
public static Task Messages_GetAttachMenuBots(this Client client, long hash = default)
=> client.Invoke(new Messages_GetAttachMenuBots
@@ -3136,14 +3145,17 @@ namespace TL
hash = hash,
});
- /// See
+ /// Returns attachment menu entry for a bot web app that can be launched from the attachment menu » See Possible codes: 400 (details)
+ /// Bot ID
public static Task Messages_GetAttachMenuBot(this Client client, InputUserBase bot)
=> client.Invoke(new Messages_GetAttachMenuBot
{
bot = bot,
});
- /// See
+ /// Enable or disable web bot attachment menu » See
+ /// Bot ID
+ /// Toggle
public static Task Messages_ToggleBotInAttachMenu(this Client client, InputUserBase bot, bool enabled)
=> client.Invoke(new Messages_ToggleBotInAttachMenu
{
@@ -3187,7 +3199,7 @@ namespace TL
theme_params = theme_params,
});
- /// ⚠ 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 See
+ /// ⚠ 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 See [bots: ✓] Possible codes: 400 (details)
public static Task Messages_SendWebViewResultMessage(this Client client, string bot_query_id, InputBotInlineResultBase result)
=> client.Invoke(new Messages_SendWebViewResultMessage
{
@@ -3205,7 +3217,9 @@ namespace TL
data = data,
});
- /// See
+ /// Transcribe voice message See
+ /// Peer ID where the voice message was sent
+ /// Voice message ID
public static Task Messages_TranscribeAudio(this Client client, InputPeer peer, int msg_id)
=> client.Invoke(new Messages_TranscribeAudio
{
@@ -3213,7 +3227,11 @@ namespace TL
msg_id = msg_id,
});
- /// See
+ /// Rate transcribed voice message See
+ /// Peer where the voice message was sent
+ /// Message ID
+ /// Transcription ID
+ /// Whether the transcription was correct
public static Task Messages_RateTranscribedAudio(this Client client, InputPeer peer, int msg_id, long transcription_id, bool good)
=> client.Invoke(new Messages_RateTranscribedAudio
{
@@ -3223,14 +3241,16 @@ namespace TL
good = good,
});
- /// See
+ /// Fetch info about custom emojis. See [bots: ✓]
+ /// Custom emoji IDs from a .
public static Task Messages_GetCustomEmojiDocuments(this Client client, long[] document_id)
=> client.Invoke(new Messages_GetCustomEmojiDocuments
{
document_id = document_id,
});
- /// See
+ /// Gets the list of currently installed custom emoji stickersets. See
+ /// Hash for pagination, for more info click here
/// a null value means messages.allStickersNotModified
public static Task Messages_GetEmojiStickers(this Client client, long hash = default)
=> client.Invoke(new Messages_GetEmojiStickers
@@ -3238,7 +3258,8 @@ namespace TL
hash = hash,
});
- /// See
+ /// Gets featured custom emoji stickersets. See
+ /// Hash for pagination, for more info click here
public static Task Messages_GetFeaturedEmojiStickers(this Client client, long hash = default)
=> client.Invoke(new Messages_GetFeaturedEmojiStickers
{
@@ -3390,7 +3411,7 @@ namespace TL
limit = limit,
});
- /// Request a reupload of a certain file to a CDN DC. See [bots: ✓] Possible codes: 400 (details)
+ /// Request a reupload of a certain file to a CDN DC. See [bots: ✓] Possible codes: 400,500 (details)
/// File token
/// Request token
public static Task Upload_ReuploadCdnFile(this Client client, byte[] file_token, byte[] request_token)
@@ -3594,7 +3615,7 @@ namespace TL
hash = hash,
});
- /// See
+ /// Get Telegram Premim promotion information See
public static Task Help_GetPremiumPromo(this Client client)
=> client.Invoke(new Help_GetPremiumPromo
{
@@ -3877,6 +3898,7 @@ namespace TL
});
/// Delete the history of a supergroup See Possible codes: 400 (details)
+ /// Whether the history should be deleted for everyone
/// Supergroup whose history must be deleted
/// ID of message up to which the history must be deleted
public static Task Channels_DeleteHistory(this Client client, InputChannelBase channel, int max_id = default, bool for_everyone = false)
@@ -3961,7 +3983,7 @@ namespace TL
{
});
- /// Convert a supergroup to a gigagroup, when requested by channel suggestions. See Possible codes: 400 (details)
+ /// Convert a supergroup to a gigagroup, when requested by channel suggestions. See Possible codes: 400,403 (details)
/// The supergroup to convert
public static Task Channels_ConvertToGigagroup(this Client client, InputChannelBase channel)
=> client.Invoke(new Channels_ConvertToGigagroup
@@ -3987,7 +4009,7 @@ namespace TL
channel = channel,
});
- /// Obtains a list of peers that can be used to send messages in a specific group See [bots: ✓] Possible codes: 400 (details)
+ /// Obtains a list of peers that can be used to send messages in a specific group See Possible codes: 400 (details)
/// The group where we intend to send messages
public static Task Channels_GetSendAs(this Client client, InputPeer peer)
=> client.Invoke(new Channels_GetSendAs
@@ -3995,7 +4017,7 @@ namespace TL
peer = peer,
});
- /// Delete all messages sent by a specific participant of a given supergroup See [bots: ✓] Possible codes: 400 (details)
+ /// Delete all messages sent by a specific participant of a given supergroup See Possible codes: 400,403 (details)
/// Supergroup
/// The participant whose messages should be deleted
public static Task Channels_DeleteParticipantHistory(this Client client, InputChannelBase channel, InputPeer participant)
@@ -4005,7 +4027,9 @@ namespace TL
participant = participant,
});
- /// See
+ /// Set whether all users should join a discussion group in order to comment on a post » See
+ /// Discussion group
+ /// Toggle
public static Task Channels_ToggleJoinToSend(this Client client, InputChannelBase channel, bool enabled)
=> client.Invoke(new Channels_ToggleJoinToSend
{
@@ -4013,7 +4037,9 @@ namespace TL
enabled = enabled,
});
- /// See
+ /// Set whether all users should request admin approval to join the group ». See
+ /// Group
+ /// Toggle
public static Task Channels_ToggleJoinRequest(this Client client, InputChannelBase channel, bool enabled)
=> client.Invoke(new Channels_ToggleJoinRequest
{
@@ -4063,7 +4089,7 @@ namespace TL
lang_code = lang_code,
});
- /// Obtain a list of bot commands for the specified bot scope and language code See [bots: ✓]
+ /// Obtain a list of bot commands for the specified bot scope and language code See [bots: ✓] Possible codes: 400 (details)
/// Command scope
/// Language code
public static Task Bots_GetBotCommands(this Client client, BotCommandScope scope, string lang_code)
@@ -4073,7 +4099,9 @@ namespace TL
lang_code = lang_code,
});
- /// See
+ /// Sets the menu button action for a given user or for all users See [bots: ✓]
+ /// User ID
+ /// Bot menu button action
public static Task Bots_SetBotMenuButton(this Client client, InputUserBase user_id, BotMenuButtonBase button)
=> client.Invoke(new Bots_SetBotMenuButton
{
@@ -4081,21 +4109,24 @@ namespace TL
button = button,
});
- /// See
+ /// Gets the menu button action for a given user or for all users, previously set using bots.setBotMenuButton; users can see this information in the . See [bots: ✓] Possible codes: 400 (details)
+ /// User ID or empty for the default menu button.
public static Task Bots_GetBotMenuButton(this Client client, InputUserBase user_id)
=> client.Invoke(new Bots_GetBotMenuButton
{
user_id = user_id,
});
- /// See
+ /// Set the default suggested admin rights for bots being added as admins to channels. See [bots: ✓] Possible codes: (details)
+ /// Admin rights
public static Task Bots_SetBotBroadcastDefaultAdminRights(this Client client, ChatAdminRights admin_rights)
=> client.Invoke(new Bots_SetBotBroadcastDefaultAdminRights
{
admin_rights = admin_rights,
});
- /// See
+ /// Set the default suggested admin rights for bots being added as admins to groups. See [bots: ✓] Possible codes: (details)
+ /// Admin rights
public static Task Bots_SetBotGroupDefaultAdminRights(this Client client, ChatAdminRights admin_rights)
=> client.Invoke(new Bots_SetBotGroupDefaultAdminRights
{
@@ -4103,6 +4134,7 @@ namespace TL
});
/// Get a payment form See Possible codes: 400 (details)
+ /// Invoice
/// 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:
bg_color - Background color
text_color - Text color
hint_color - Hint text color
link_color - Link color
button_color - Button color
button_text_color - Button text color
public static Task Payments_GetPaymentForm(this Client client, InputInvoice invoice, DataJSON theme_params = null)
=> client.Invoke(new Payments_GetPaymentForm
@@ -4124,6 +4156,7 @@ namespace TL
/// Submit requested order information for validation See Possible codes: 400 (details)
/// Save order information to re-use it for future orders
+ /// Invoice
/// Requested order information
public static Task Payments_ValidateRequestedInfo(this Client client, InputInvoice invoice, PaymentRequestedInfo info, bool save = false)
=> client.Invoke(new Payments_ValidateRequestedInfo
@@ -4135,6 +4168,7 @@ namespace TL
/// Send compiled payment form See Possible codes: 400 (details)
/// Form ID
+ /// Invoice
/// ID of saved and validated
/// Chosen shipping option ID
/// Payment credentials
@@ -4174,7 +4208,8 @@ namespace TL
number = number,
});
- /// See
+ /// Export invoice See [bots: ✓] Possible codes: 400 (details)
+ /// Invoice
public static Task Payments_ExportInvoice(this Client client, InputMedia invoice_media)
=> client.Invoke(new Payments_ExportInvoice
{
@@ -4350,7 +4385,7 @@ namespace TL
peer = peer,
});
- /// Refuse or end running call See Possible codes: 400 (details)
+ /// Refuse or end running call See Possible codes: 400,500 (details)
/// Whether this is a video call
/// The phone call
/// Call duration
@@ -4416,7 +4451,7 @@ namespace TL
schedule_date = schedule_date.GetValueOrDefault(),
});
- /// Join a group call See Possible codes: 400 (details)
+ /// Join a group call See Possible codes: 400,403 (details)
/// If set, the user will be muted by default upon joining.
/// If set, the user's video will be disabled by default upon joining.
/// The group call
@@ -4453,7 +4488,7 @@ namespace TL
users = users,
});
- /// Terminate a group call See
+ /// Terminate a group call See Possible codes: 400 (details)
/// The group call to terminate
public static Task Phone_DiscardGroupCall(this Client client, InputGroupCall call)
=> client.Invoke(new Phone_DiscardGroupCall
@@ -4499,7 +4534,7 @@ namespace TL
limit = limit,
});
- /// Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs See
+ /// Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs See Possible codes: 400 (details)
/// Group call
/// Source IDs
public static Task Phone_CheckGroupCall(this Client client, InputGroupCall call, int[] sources)
@@ -4509,7 +4544,7 @@ namespace TL
sources = sources,
});
- /// Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves). See
+ /// Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves). See Possible codes: 400,403 (details)
/// Whether to start or stop recording
/// Whether to also record video streams
/// The group call or livestream
@@ -4524,7 +4559,7 @@ namespace TL
video_portrait = video_portrait.GetValueOrDefault(),
});
- /// Edit information about a given group call participant See Possible codes: 400 (details)
+ /// Edit information about a given group call participant See Possible codes: 400,403 (details)
/// The group call
/// The group call participant (can also be the user itself)
/// Whether to mute or unmute the specified participant
@@ -4547,7 +4582,7 @@ namespace TL
presentation_paused = presentation_paused.GetValueOrDefault(),
});
- /// Edit the title of a group call or livestream See
+ /// Edit the title of a group call or livestream See Possible codes: 403 (details)
/// Group call
/// New title
public static Task Phone_EditGroupCallTitle(this Client client, InputGroupCall call, string title)
@@ -4557,7 +4592,7 @@ namespace TL
title = title,
});
- /// Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel. See
+ /// Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel. See Possible codes: 400 (details)
/// The dialog whose group call or livestream we're trying to join
public static Task Phone_GetGroupCallJoinAs(this Client client, InputPeer peer)
=> client.Invoke(new Phone_GetGroupCallJoinAs
@@ -4575,7 +4610,7 @@ namespace TL
call = call,
});
- /// Subscribe or unsubscribe to a scheduled group call See
+ /// Subscribe or unsubscribe to a scheduled group call See Possible codes: 403 (details)
/// Scheduled group call
/// Enable or disable subscription
public static Task Phone_ToggleGroupCallStartSubscription(this Client client, InputGroupCall call, bool subscribed)
@@ -4593,7 +4628,7 @@ namespace TL
call = call,
});
- /// Set the default peer that will be used to join a group call in a specific dialog. See
+ /// Set the default peer that will be used to join a group call in a specific dialog. See Possible codes: 400 (details)
/// The dialog
/// The default peer that will be used to join group calls in this dialog, presenting yourself as a specific user/channel.
public static Task Phone_SaveDefaultGroupCallJoinAs(this Client client, InputPeer peer, InputPeer join_as)
@@ -4629,7 +4664,7 @@ namespace TL
call = call,
});
- /// Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with phone.createGroupCall (the rtmp_stream flag must be set). See
+ /// Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with phone.createGroupCall (the rtmp_stream flag must be set). See Possible codes: 400 (details)
/// Peer to livestream into
/// Whether to revoke the previous stream key or simply return the existing one
public static Task Phone_GetGroupCallStreamRtmpUrl(this Client client, InputPeer peer, bool revoke)
@@ -4639,7 +4674,9 @@ namespace TL
revoke = revoke,
});
- /// See
+ /// Save phone call debug information See
+ /// Phone call
+ /// Logs
public static Task Phone_SaveCallLog(this Client client, InputPhoneCall peer, InputFileBase file)
=> client.Invoke(new Phone_SaveCallLog
{
@@ -4689,7 +4726,7 @@ namespace TL
lang_pack = lang_pack,
});
- /// Get information about a language in a localization pack See
+ /// Get information about a language in a localization pack See Possible codes: 400 (details)
/// Language pack name
/// Language code
public static Task Langpack_GetLanguage(this Client client, string lang_pack, string lang_code)