From dea7691075ad2facbc42c66cbce37efd3808bf3b Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Wed, 14 Aug 2024 14:41:26 +0200
Subject: [PATCH] api doc
---
.github/dev.yml | 2 +-
FAQ.md | 5 +-
src/TL.Schema.cs | 281 +++++++++++++++++++++++++++++-------------
src/TL.SchemaFuncs.cs | 126 +++++++++++++------
4 files changed, 286 insertions(+), 128 deletions(-)
diff --git a/.github/dev.yml b/.github/dev.yml
index 567ecd3..b994351 100644
--- a/.github/dev.yml
+++ b/.github/dev.yml
@@ -1,7 +1,7 @@
pr: none
trigger: [ master ]
-name: 4.1.7-dev.$(Rev:r)
+name: 4.1.8-dev.$(Rev:r)
pool:
vmImage: ubuntu-latest
diff --git a/FAQ.md b/FAQ.md
index 8a5a040..76a889d 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -59,7 +59,6 @@ You also need to obtain their `access_hash` which is specific to the resource yo
This serves as a proof that the logged-in user is entitled to access that channel/user/photo/document/...
(otherwise, anybody with the ID could access it)
-> [!IMPORTANT]
> A small private group `Chat` don't need an access_hash and can be queried using their `chat_id` only.
However most common chat groups are not `Chat` but a `Channel` supergroup (without the `broadcast` flag). See [Terminology in ReadMe](README.md#terminology).
Some TL methods only applies to private `Chat`, some only applies to `Channel` and some to both.
@@ -109,8 +108,8 @@ To fix this, you should also switch to using the [WTelegramClient Nuget package]
You can get these kind of problems if you abuse Telegram [Terms of Service](https://telegram.org/tos), or the [API Terms of Service](https://core.telegram.org/api/terms), or make excessive requests.
You can try to wait more between the requests, wait for a day or two to see if the requests become possible again.
-> [!NOTE]
-> For FLOOD_WAIT_X with X < 60 seconds (see `client.FloodRetryThreshold`), WTelegramClient will automatically wait the specified delay and retry the request for you.
+
+>ℹ️ For FLOOD_WAIT_X with X < 60 seconds (see `client.FloodRetryThreshold`), WTelegramClient will automatically wait the specified delay and retry the request for you.
For longer delays, you can catch the thrown `RpcException` and check the value of property X.
An account that was restricted due to reported spam might receive PEER_FLOOD errors. Read [Telegram Spam FAQ](https://telegram.org/faq_spam) to learn more.
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 53e163c..c6d7063 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -129,7 +129,7 @@ namespace TL
public string last_name;
}
- /// Defines a file uploaded by the client. See Derived classes: ,
+ /// Defines a file uploaded by the client. See Derived classes: , ,
public abstract partial class InputFileBase : IObject
{
/// Random file identifier created by the client
@@ -178,7 +178,7 @@ namespace TL
public override string Name { get => name; set => name = value; }
}
- /// Defines media content of a message. See Derived classes: , , , , , , , , , , , , , , ,
+ /// Defines media content of a message. See Derived classes: , , , , , , , , , , , , , , , ,
/// a value means inputMediaEmpty
public abstract partial class InputMedia : IObject { }
/// Photo See
@@ -385,7 +385,7 @@ namespace TL
public DataJSON provider_data;
/// Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice.
[IfFlag(1)] public string start_param;
- /// Extended media
+ /// Deprecated
[IfFlag(2)] public InputMedia extended_media;
[Flags] public enum Flags : uint
@@ -485,11 +485,13 @@ namespace TL
optional = 0x4,
}
}
- /// See
+ /// Paid media, see here » for more info. See
[TLDef(0xAA661FC3)]
public sealed partial class InputMediaPaidMedia : InputMedia
{
+ /// The price of the media in Telegram Stars.
public long stars_amount;
+ /// Photos or videos.
public InputMedia[] extended_media;
}
@@ -768,7 +770,7 @@ namespace TL
[IfFlag(1)] public string first_name;
/// Last name.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set.
[IfFlag(2)] public string last_name;
- /// Main active username.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set.
+ /// Main active username.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set.
Changes to this flag should invalidate the local cache for this user ID if the above conditions are respected and the bot_can_edit flag is also set.
[IfFlag(3)] public string username;
/// Phone number.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set.
[IfFlag(4)] public string phone;
@@ -776,7 +778,7 @@ namespace TL
[IfFlag(5)] public UserProfilePhoto photo;
/// Online status of user.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set OR
- The locally cached user entry is equal to .
[IfFlag(6)] public UserStatus status;
- /// Version of the bot_info field in userFull, incremented every time it changes.
Changes to this flag should invalidate the local cache for this user ID.
+ /// Version of the bot_info field in userFull, incremented every time it changes.
Changes to this flag should invalidate the local cache for this user ID, see here » for more info.
[IfFlag(14)] public int bot_info_version;
/// Contains the reason why access to this user must be restricted.
[IfFlag(18)] public RestrictionReason[] restriction_reason;
@@ -788,12 +790,13 @@ namespace TL
[IfFlag(30)] public EmojiStatus emoji_status;
/// Additional usernames.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set.
Changes to this flag (if the above conditions are respected) should invalidate the local cache for this user ID.
[IfFlag(32)] public Username[] usernames;
- /// ID of the maximum read story.
+ /// ID of the maximum read story.
When updating the local peer database, do not apply changes to this field if the min flag of the incoming constructor is set.
[IfFlag(37)] public int stories_max_id;
/// The user's accent color.
[IfFlag(40)] public PeerColor color;
/// The user's profile color.
[IfFlag(41)] public PeerColor profile_color;
+ /// Monthly Active Users (MAU) of this bot (may be absent for small bots).
[IfFlag(44)] public int bot_active_users;
[Flags] public enum Flags : uint
@@ -818,9 +821,9 @@ namespace TL
contact = 0x800,
/// Whether this user is a mutual contact.
When updating the local peer database, do not apply changes to this field if the min flag is set.
mutual_contact = 0x1000,
- /// Whether the account of this user was deleted
+ /// Whether the account of this user was deleted.
Changes to this flag should invalidate the local cache for this user ID, see here » for more info.
deleted = 0x2000,
- /// Is this user a bot?
Changes to this flag should invalidate the local cache for this user ID.
+ /// Is this user a bot?
Changes to this flag should invalidate the local cache for this user ID, see here » for more info.
bot = 0x4000,
/// Can the bot see all messages in groups?
bot_chat_history = 0x8000,
@@ -848,7 +851,7 @@ namespace TL
fake = 0x4000000,
/// Whether this bot offers an attachment menu web app
bot_attach_menu = 0x8000000,
- /// Whether this user is a Telegram Premium user
Changes to this flag should invalidate the local cache for this user ID.
Changes to this flag if the self flag is set should also trigger the following calls, to refresh the respective caches:
- The Help_GetConfig cache
- The Messages_GetTopReactions cache if the bot flag is not set
+ /// Whether this user is a Telegram Premium user
Changes to this flag should invalidate the local cache for this user ID, see here » for more info.
Changes to this flag if the self flag is set should also trigger the following calls, to refresh the respective caches:
- The Help_GetConfig cache
- The Messages_GetTopReactions cache if the bot flag is not set
premium = 0x10000000,
/// Whether we installed the attachment menu web app offered by this bot.
When updating the local peer database, do not apply changes to this field if the min flag is set.
attach_menu_enabled = 0x20000000,
@@ -874,12 +877,13 @@ namespace TL
has_color = 0x100,
/// Field has a value
has_profile_color = 0x200,
- /// If set, we can only write to this user if they have already sent some messages to us, if we are subscribed to Telegram Premium, or if they're a mutual contact (.mutual_contact).
All the secondary conditions listed above must be checked separately to verify whether we can still write to the user, even if this flag is set (i.e. a mutual contact will have this flag set even if we can still write to them, and so on...); to avoid doing these extra checks if we haven't yet cached all the required information (for example while displaying the chat list in the sharing UI) the Users_GetIsPremiumRequiredToContact method may be invoked instead, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.
To set this flag for ourselves invoke Account_SetGlobalPrivacySettings, setting the settings.new_noncontact_peers_require_premium flag.
+ /// If set, we can only write to this user if they have already sent some messages to us, if we are subscribed to Telegram Premium, or if they're a mutual contact (.mutual_contact).
All the secondary conditions listed above must be checked separately to verify whether we can still write to the user, even if this flag is set (i.e. a mutual contact will have this flag set even if we can still write to them, and so on...); to avoid doing these extra checks if we haven't yet cached all the required information (for example while displaying the chat list in the sharing UI) the Users_GetIsPremiumRequiredToContact method may be invoked instead, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user; alternatively, the .contact_require_premium flag contains the same (fully checked, i.e. it's not just a copy of this flag) info returned by Users_GetIsPremiumRequiredToContact.
To set this flag for ourselves invoke Account_SetGlobalPrivacySettings, setting the settings.new_noncontact_peers_require_premium flag.
contact_require_premium = 0x400,
/// Whether this bot can be connected to a user as specified here ».
bot_business = 0x800,
/// Field has a value
has_bot_active_users = 0x1000,
+ /// If set, this bot has configured a Main Mini App ».
bot_has_main_app = 0x2000,
}
}
@@ -984,7 +988,7 @@ namespace TL
/// Group identifier
public override long ID => id;
}
- /// Info about a group See
+ /// Info about a group. See
[TLDef(0x41CBF256)]
public sealed partial class Chat : ChatBase
{
@@ -1070,7 +1074,7 @@ namespace TL
public ChatPhoto photo;
/// Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date
public DateTime date;
- /// Contains the reason why access to this channel must be restricted.
+ /// Contains the reason why access to this channel must be restricted.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
[IfFlag(9)] public RestrictionReason[] restriction_reason;
/// Admin rights of the user in this channel (see rights)
[IfFlag(14)] public ChatAdminRights admin_rights;
@@ -1090,7 +1094,7 @@ namespace TL
[IfFlag(40)] public PeerColor profile_color;
/// Emoji status
[IfFlag(41)] public EmojiStatus emoji_status;
- /// Boost level
+ /// Boost level.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
[IfFlag(42)] public int level;
[Flags] public enum Flags : uint
@@ -1105,9 +1109,9 @@ namespace TL
has_username = 0x40,
/// Is this channel verified by telegram?
verified = 0x80,
- /// Is this a supergroup?
+ /// Is this a supergroup?
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
megagroup = 0x100,
- /// Whether viewing/writing in this channel for a reason (see restriction_reason
+ /// Whether viewing/writing in this channel for a reason (see restriction_reason)
restricted = 0x200,
/// Whether signatures are enabled (channels)
signatures = 0x800,
@@ -1123,29 +1127,29 @@ namespace TL
has_participants_count = 0x20000,
/// Field has a value
has_default_banned_rights = 0x40000,
- /// This channel/supergroup is probably a scam
+ /// This channel/supergroup is probably a scam
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
scam = 0x80000,
- /// Whether this channel has a private join link
+ /// Whether this channel has a linked discussion group » (or this supergroup is a channel's discussion group). The actual ID of the linked channel/supergroup is contained in .linked_chat_id.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
has_link = 0x100000,
/// Whether this chanel has a geoposition
has_geo = 0x200000,
- /// Whether slow mode is enabled for groups to prevent flood in chat
+ /// Whether slow mode is enabled for groups to prevent flood in chat.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
slowmode_enabled = 0x400000,
/// Whether a group call or livestream is currently active
call_active = 0x800000,
/// Whether there's anyone in the group call or livestream
call_not_empty = 0x1000000,
- /// If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.
+ /// If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
fake = 0x2000000,
- /// Whether this supergroup is a gigagroup
+ /// Whether this supergroup is a gigagroup
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
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
+ /// Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using Channels_ToggleJoinToSend
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
join_to_send = 0x10000000,
- /// Whether a user's join request will have to be approved by administrators, toggle using Channels_ToggleJoinRequest
+ /// Whether a user's join request will have to be approved by administrators, toggle using Channels_ToggleJoinRequest
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
join_request = 0x20000000,
- /// Whether this supergroup is a forum
+ /// Whether this supergroup is a forum.
Changes to this flag should invalidate the local cache for this channel/supergroup ID, see here » for more info.
forum = 0x40000000,
}
@@ -1399,7 +1403,7 @@ namespace TL
[IfFlag(9)] public int available_min_id;
/// Peer folder ID, for more info click here
[IfFlag(11)] public int folder_id;
- /// ID of the linked discussion chat for channels
+ /// ID of the linked discussion chat for channels (and vice versa, the ID of the linked channel for discussion chats).
[IfFlag(14)] public long linked_chat_id;
/// Location of the geogroup
[IfFlag(15)] public ChannelLocation location;
@@ -1534,11 +1538,13 @@ namespace TL
has_emojiset = 0x400,
/// Whether ads on this channel were disabled as specified here » (this flag is only visible to the owner of the channel).
restricted_sponsored = 0x800,
- /// If set, this user can view ad revenue statistics » for this channel.
+ /// If set, this user can view ad revenue statistics » for this channel.
can_view_revenue = 0x1000,
/// Field has a value
has_reactions_limit = 0x2000,
+ /// Whether the current user can send or forward paid media » to this channel.
paid_media_allowed = 0x4000,
+ /// If set, this user can view Telegram Star revenue statistics » for this channel.
can_view_stars_revenue = 0x8000,
}
@@ -1919,7 +1925,7 @@ namespace TL
public override int TtlPeriod => ttl_period;
}
- /// Media See Derived classes: , , , , , , , , , , , , , ,
+ /// Media See Derived classes: , , , , , , , , , , , , , , ,
/// a value means messageMediaEmpty
public abstract partial class MessageMedia : IObject { }
/// Attached photo. See
@@ -2066,7 +2072,7 @@ namespace TL
public long total_amount;
/// Unique bot deep-linking parameter that can be used to generate this invoice
public string start_param;
- /// Extended media
+ /// Deprecated
[IfFlag(4)] public MessageExtendedMediaBase extended_media;
[Flags] public enum Flags : uint
@@ -2213,15 +2219,17 @@ namespace TL
has_additional_peers_count = 0x8,
}
}
- /// See
+ /// Paid media, see here » for more info. See
[TLDef(0xA8852491)]
public sealed partial class MessageMediaPaidMedia : MessageMedia
{
+ /// The price of the media in Telegram Stars.
public long stars_amount;
+ /// Either the paid-for media, or super low resolution media previews if the media wasn't purchased yet, see here » for more info.
public MessageExtendedMediaBase[] extended_media;
}
- /// Object describing actions connected to a service message. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
+ /// Object describing actions connected to a service message. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
/// a value means messageActionEmpty
public abstract partial class MessageAction : IObject { }
/// Group created See
@@ -2688,37 +2696,53 @@ namespace TL
/// Info about the shared peers.
public RequestedPeer[] peers;
}
- /// See
+ /// Describes a payment refund (service message received by both users and bots). See
[TLDef(0x41B3E202)]
public sealed partial class MessageActionPaymentRefunded : MessageAction
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Identifier of the peer that returned the funds.
public Peer peer;
+ /// Currency, XTR for Telegram Stars.
public string currency;
+ /// Total price 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;
+ /// Bot specified invoice payload (only received by bots).
[IfFlag(0)] public byte[] payload;
+ /// Provider payment identifier
public PaymentCharge charge;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_payload = 0x1,
}
}
- /// See
+ /// You gifted or were gifted some Telegram Stars. See
[TLDef(0x45D5B021)]
public sealed partial class MessageActionGiftStars : MessageAction
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// 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;
+ /// Amount of gifted stars
public long stars;
+ /// If the gift was bought using a cryptocurrency, the cryptocurrency name.
[IfFlag(0)] public string crypto_currency;
+ /// If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency.
[IfFlag(0)] public long crypto_amount;
+ /// Identifier of the transaction, only visible to the receiver of the gift.
[IfFlag(1)] public string transaction_id;
[Flags] public enum Flags : uint
{
+ /// Fields and have a value
has_crypto_currency = 0x1,
+ /// Field has a value
has_transaction_id = 0x2,
}
}
@@ -3442,7 +3466,7 @@ namespace TL
blocked_my_stories_from = 0x8000000,
/// Whether the other user has chosen a custom wallpaper for us using Messages_SetChatWallPaper and the for_both flag, see here » for more info.
wallpaper_overridden = 0x10000000,
- /// If set, we can only write to this user if they have already sent some messages to us, if we are subscribed to Telegram Premium, or if they're a mutual contact (.mutual_contact).
All the secondary conditions listed above must be checked separately to verify whether we can still write to the user, even if this flag is set (i.e. a mutual contact will have this flag set even if we can still write to them, and so on...); to avoid doing these extra checks if we haven't yet cached all the required information (for example while displaying the chat list in the sharing UI) the Users_GetIsPremiumRequiredToContact method may be invoked instead, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.
To set this flag for ourselves invoke Account_SetGlobalPrivacySettings, setting the settings.new_noncontact_peers_require_premium flag.
+ /// If set, we cannot write to this user: subscribe to Telegram Premium to get permission to write to this user.
To set this flag for ourselves invoke Account_SetGlobalPrivacySettings, setting the settings.new_noncontact_peers_require_premium flag, see here » for more info.
contact_require_premium = 0x20000000,
/// If set, we cannot fetch the exact read date of messages we send to this user using Messages_GetOutboxReadDate.
The exact read date of messages might still be unavailable for other reasons, see Messages_GetOutboxReadDate for more info.
To set this flag for ourselves invoke Account_SetGlobalPrivacySettings, setting the settings.hide_read_marks flag.
read_dates_private = 0x40000000,
@@ -3784,7 +3808,7 @@ namespace TL
[TLDef(0x1BB00451)]
public sealed partial class InputMessagesFilterPinned : MessagesFilter { }
- /// Object contains info on events occurred. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
+ /// Object contains info on events occurred. See Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
public abstract partial class Update : IObject
{
public virtual (long mbox_id, int pts, int pts_count) GetMBox() => default;
@@ -4102,7 +4126,7 @@ namespace TL
public override (long, int, int) GetMBox() => (channel_id, pts, 0);
}
- /// A new channel or supergroup is available, or info about an existing channel has changed and must be refeteched. See
+ /// Channel/supergroup ( and/or ) information was updated. See
[TLDef(0x635B4C09)]
public partial class UpdateChannel : Update
{
@@ -4825,7 +4849,7 @@ namespace TL
public override (long, int, int) GetMBox() => (channel_id, pts, pts_count);
}
- /// A new chat is available See
+ /// Chat ( and/or ) information was updated. See
[TLDef(0xF89A6A4E)]
public partial class UpdateChat : Update
{
@@ -5109,15 +5133,15 @@ namespace TL
emojis = 0x2,
}
}
- /// Extended media update See
+ /// You bought a paid media »: this update contains the revealed media. See
[TLDef(0xD5A41724)]
public sealed partial class UpdateMessageExtendedMedia : Update
{
- /// Peer
+ /// Peer where the paid media was posted
public Peer peer;
- /// Message ID
+ /// ID of the message containing the paid media
public int msg_id;
- /// Extended media
+ /// Revealed media, contains only s.
public MessageExtendedMediaBase[] extended_media;
}
/// A forum topic » was pinned or unpinned. See
@@ -5154,7 +5178,7 @@ namespace TL
has_order = 0x1,
}
}
- /// User ( and/or ) information was updated, it must be refetched using Users_GetFullUser. See
+ /// User ( and/or ) information was updated. See
[TLDef(0x20529438)]
public partial class UpdateUser : Update
{
@@ -5460,30 +5484,42 @@ namespace TL
/// New balance.
public long balance;
}
- /// See
+ /// A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button. See
[TLDef(0x1EA2FDA7)]
public sealed partial class UpdateBusinessBotCallbackQuery : Update
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Query ID
public long query_id;
+ /// ID of the user that pressed the button
public long user_id;
+ /// Business connection ID
public string connection_id;
+ /// Message that contains the keyboard (also contains info about the chat where the message was sent).
public MessageBase message;
+ /// The message that message is replying to.
[IfFlag(2)] public MessageBase reply_to_message;
+ /// Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
public long chat_instance;
+ /// Callback data
[IfFlag(0)] public byte[] data;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_data = 0x1,
+ /// Field has a value
has_reply_to_message = 0x4,
}
}
- /// See
+ /// The Telegram Star balance of a channel/bot we own has changed ». See
[TLDef(0xA584B019)]
public sealed partial class UpdateStarsRevenueStatus : Update
{
+ /// Channel/bot
public Peer peer;
+ /// New Telegram Star balance.
public StarsRevenueStatus status;
}
@@ -6824,6 +6860,7 @@ namespace TL
public int h;
/// Number of bytes to preload when preloading videos (particularly video stories).
[IfFlag(2)] public int preload_prefix_size;
+ /// Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail.
[IfFlag(4)] public double video_start_ts;
[Flags] public enum Flags : uint
@@ -7532,6 +7569,7 @@ namespace TL
has_description_photo = 0x10,
/// Field has a value
has_description_document = 0x20,
+ /// If set, the bot has some preview medias for the configured Main Mini App, see here » for more info on Main Mini App preview medias.
has_preview_medias = 0x40,
}
}
@@ -8008,7 +8046,7 @@ namespace TL
public Flags flags;
/// The latest PTS
public int pts;
- /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed
+ /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info.
[IfFlag(1)] public int timeout;
[Flags] public enum Flags : uint
@@ -8056,7 +8094,7 @@ namespace TL
public Flags flags;
/// The PTS from which to start getting updates the next time
public int pts;
- /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed
+ /// Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info.
[IfFlag(1)] public int timeout;
/// New messages
public MessageBase[] new_messages;
@@ -9161,6 +9199,7 @@ namespace TL
public Flags flags;
/// On Android, the nonce to be used as described in the auth documentation »
[IfFlag(0)] public byte[] nonce;
+ /// Google Play Integrity project ID
[IfFlag(2)] public long play_integrity_project_id;
/// Play Integrity API nonce
[IfFlag(2)] public byte[] play_integrity_nonce;
@@ -9352,7 +9391,7 @@ namespace TL
ForwardUsers = 0xA8406CA9,
///Chats to which the users often forwards messages to
ForwardChats = 0xFBEEC0F0,
- ///See
+ ///Most frequently used Main Mini Bot Apps.
BotsApp = 0xFD9E7BEC,
}
@@ -9421,6 +9460,7 @@ namespace TL
[IfFlag(5)] public InputMedia media;
/// Date of last update of the draft.
public DateTime date;
+ /// A message effect that should be played as specified here ».
[IfFlag(7)] public long effect;
[Flags] public enum Flags : uint
@@ -12792,7 +12832,7 @@ namespace TL
[TLDef(0xFF16E2CA)]
public sealed partial class PollAnswer : IObject
{
- /// Textual representation of the answer (Premium users only, only custom emoji entities are supported).
+ /// Textual representation of the answer (only Premium users can use custom emoji entities here).
public TextWithEntities text;
/// The param that has to be passed to Messages_SendVote.
public byte[] option;
@@ -12806,7 +12846,7 @@ namespace TL
public long id;
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
- /// The question of the poll (Premium users only, only custom emoji entities are supported).
+ /// The question of the poll (only Premium users can use custom emoji entities here).
public TextWithEntities question;
/// The possible answers, vote using Messages_SendVote.
public PollAnswer[] answers;
@@ -15270,8 +15310,9 @@ namespace TL
[TLDef(0x4D22FF98)]
public sealed partial class WebViewResultUrl : WebViewResult
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
- /// Webview session ID
+ /// Webview session ID (only returned by inline button mini apps, menu button mini apps, attachment menu mini apps).
[IfFlag(0)] public long query_id;
/// Webview URL to open
public string url;
@@ -15280,6 +15321,7 @@ namespace TL
{
/// Field has a value
has_query_id = 0x1,
+ /// If set, the app must be opened in fullsize mode instead of compact mode.
fullsize = 0x2,
}
}
@@ -15378,11 +15420,11 @@ namespace TL
/// An invoice See Derived classes: , , ,
public abstract partial class InputInvoice : IObject { }
- /// An invoice contained in a message. See
+ /// An invoice contained in a message or paid media ». See
[TLDef(0xC5B56859)]
public sealed partial class InputInvoiceMessage : InputInvoice
{
- /// Chat where the invoice was sent
+ /// Chat where the invoice/paid media was sent
public InputPeer peer;
/// Message ID
public int msg_id;
@@ -15403,10 +15445,11 @@ namespace TL
/// Should be populated with one of the giveaway options returned by Payments_GetPremiumGiftCodeOptions, see the giveaways » documentation for more info.
public PremiumGiftCodeOption option;
}
- /// Used to top up the current account's Telegram Stars balance. See
+ /// Used to top up the Telegram Stars balance of the current account or someone else's account. See
[TLDef(0x65F00CE3)]
public sealed partial class InputInvoiceStars : InputInvoice
{
+ /// Either an or an .
public InputStorePaymentPurpose purpose;
}
@@ -15460,7 +15503,7 @@ namespace TL
public Dictionary users;
}
- /// Info about a Telegram Premium purchase See Derived classes: , , , ,
+ /// Info about a Telegram Premium purchase See Derived classes: , , , , ,
public abstract partial class InputStorePaymentPurpose : IObject { }
/// Info about a Telegram Premium purchase See
[TLDef(0xA6751E66)]
@@ -15546,21 +15589,28 @@ namespace TL
has_prize_description = 0x10,
}
}
- /// See
+ /// Used to top up the Telegram Stars balance of the current account. See
[TLDef(0xDDDD0F56)]
public sealed partial class InputStorePaymentStarsTopup : InputStorePaymentPurpose
{
+ /// Amount of stars to topup
public long stars;
+ /// Three-letter ISO 4217 currency code
public string currency;
+ /// Total price 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
+ /// Used to gift Telegram Stars to a friend. See
[TLDef(0x1D741EF7)]
public sealed partial class InputStorePaymentStarsGift : InputStorePaymentPurpose
{
+ /// The user to which the stars should be gifted.
public InputUserBase user_id;
+ /// Amount of stars to gift
public long stars;
+ /// Three-letter ISO 4217 currency code
public string currency;
+ /// Total price 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;
}
@@ -15783,9 +15833,9 @@ namespace TL
}
}
- /// Extended media See Derived classes: ,
+ /// Paid media, see here » for more info. See Derived classes: ,
public abstract partial class MessageExtendedMediaBase : IObject { }
- /// Extended media preview See
+ /// Paid media preview for not yet purchased paid media, see here » for more info. See
[TLDef(0xAD628CC8)]
public sealed partial class MessageExtendedMediaPreview : MessageExtendedMediaBase
{
@@ -15795,9 +15845,9 @@ namespace TL
[IfFlag(0)] public int w;
/// Height
[IfFlag(0)] public int h;
- /// Thumbnail
+ /// Extremely low resolution thumbnail.
[IfFlag(1)] public PhotoSizeBase thumb;
- /// Video duration
+ /// Video duration for videos.
[IfFlag(2)] public int video_duration;
[Flags] public enum Flags : uint
@@ -15810,11 +15860,11 @@ namespace TL
has_video_duration = 0x4,
}
}
- /// Extended media See
+ /// Already purchased paid media, see here » for more info. See
[TLDef(0xEE479C64)]
public sealed partial class MessageExtendedMedia : MessageExtendedMediaBase
{
- /// Media
+ /// The media we purchased.
public MessageMedia media;
}
@@ -16871,6 +16921,7 @@ namespace TL
[TLDef(0xCFC9E002)]
public sealed partial class MediaAreaCoordinates : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// The abscissa of the rectangle's center, as a percentage of the media width (0-100).
public double x;
@@ -16882,6 +16933,7 @@ namespace TL
public double h;
/// Clockwise rotation angle of the rectangle, in degrees (0-360).
public double rotation;
+ /// The radius of the rectangle corner rounding, as a percentage of the media width.
[IfFlag(0)] public double radius;
[Flags] public enum Flags : uint
@@ -16891,7 +16943,7 @@ namespace TL
}
}
- /// Represents a story media area » See Derived classes: , , , , ,
+ /// Represents a story media area » See Derived classes: , , , , , , ,
public abstract partial class MediaArea : IObject { }
/// Represents a location tag attached to a story, with additional venue information. See
[TLDef(0xBE82DB9C)]
@@ -16927,11 +16979,13 @@ namespace TL
[TLDef(0xCAD5452D)]
public sealed partial class MediaAreaGeoPoint : MediaArea
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// The size and position of the media area corresponding to the location sticker on top of the story media.
public MediaAreaCoordinates coordinates;
/// Coordinates of the geolocation tag.
public GeoPoint geo;
+ /// Optional textual representation of the address.
[IfFlag(0)] public GeoPointAddress address;
[Flags] public enum Flags : uint
@@ -16981,20 +17035,26 @@ namespace TL
/// ID of the channel message
public int msg_id;
}
- /// See
+ /// Represents a URL media area. See
[TLDef(0x37381085)]
public sealed partial class MediaAreaUrl : MediaArea
{
+ /// The size and location of the media area corresponding to the URL button on top of the story media.
public MediaAreaCoordinates coordinates;
+ /// URL to open when clicked.
public string url;
}
- /// See
+ /// Represents a weather widget ». See
[TLDef(0x49A6549C)]
public sealed partial class MediaAreaWeather : MediaArea
{
+ /// The size and location of the media area corresponding to the widget on top of the story media.
public MediaAreaCoordinates coordinates;
+ /// Weather emoji, should be rendered as an animated emoji.
public string emoji;
+ /// Temperature in degrees Celsius.
public double temperature_c;
+ /// ARGB background color.
public int color;
}
@@ -18481,7 +18541,7 @@ namespace TL
public double usd_rate;
}
- /// Contains the URL to use to withdraw channel ad revenue. See
+ /// Contains the URL to use to withdraw channel ad revenue. See
[TLDef(0xEC659737)]
public sealed partial class Stats_BroadcastRevenueWithdrawalUrl : IObject
{
@@ -18502,7 +18562,7 @@ namespace TL
/// End unixtime for the timeframe.
public DateTime to_date;
}
- /// Describes a withdrawal of ad earnings » See
+ /// Describes a withdrawal of ad earnings » See
[TLDef(0x5A590978)]
public sealed partial class BroadcastRevenueTransactionWithdrawal : BroadcastRevenueTransaction
{
@@ -18529,7 +18589,7 @@ namespace TL
failed = 0x4,
}
}
- /// Describes a refund for failed withdrawal of ad earnings » See
+ /// Describes a refund for failed withdrawal of ad earnings » See
[TLDef(0x42D30D2E)]
public sealed partial class BroadcastRevenueTransactionRefund : BroadcastRevenueTransaction
{
@@ -18659,7 +18719,7 @@ namespace TL
}
}
- /// Source of an incoming Telegram Star transaction, or its recipient for outgoing Telegram Star transactions. See Derived classes: , , , , ,
+ /// Source of an incoming Telegram Star transaction, or its recipient for outgoing Telegram Star transactions. See Derived classes: , , , , , ,
public abstract partial class StarsTransactionPeerBase : IObject { }
/// Describes a Telegram Star transaction that cannot be described using the current layer. See
[TLDef(0x95F2BFE4)]
@@ -18670,20 +18730,20 @@ namespace TL
/// Describes a Telegram Star transaction with the Play Store, used when purchasing Telegram Stars through the Play Store. See
[TLDef(0x7B560A0B)]
public sealed partial class StarsTransactionPeerPlayMarket : StarsTransactionPeerBase { }
- /// Describes a Telegram Star transaction made using @PremiumBot (i.e. using the flow described here »). See
+ /// Describes a Telegram Star transaction made using @PremiumBot (i.e. using the flow described here »). See
[TLDef(0x250DBAF8)]
public sealed partial class StarsTransactionPeerPremiumBot : StarsTransactionPeerBase { }
/// Describes a Telegram Star transaction with Fragment, used when purchasing Telegram Stars through Fragment. See
[TLDef(0xE92FD902)]
public sealed partial class StarsTransactionPeerFragment : StarsTransactionPeerBase { }
- /// Describes a Telegram Star transaction with another peer (usually a bot or a channel). See
+ /// Describes a Telegram Star transaction with another peer. See
[TLDef(0xD80DA15D)]
public sealed partial class StarsTransactionPeer : StarsTransactionPeerBase
{
/// The peer.
public Peer peer;
}
- /// See
+ /// Describes a Telegram Star transaction used to pay for Telegram ads as specified here ». See
[TLDef(0x60682812)]
public sealed partial class StarsTransactionPeerAds : StarsTransactionPeerBase { }
@@ -18731,10 +18791,15 @@ namespace TL
[IfFlag(1)] public string description;
/// For transactions with bots, photo of the bought product.
[IfFlag(2)] public WebDocumentBase photo;
+ /// If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (Unix timestamp) when the withdrawal was completed successfully.
[IfFlag(5)] public DateTime transaction_date;
+ /// If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed.
[IfFlag(5)] public string transaction_url;
+ /// Bot specified invoice payload (i.e. the payload passed to when creating the invoice).
[IfFlag(7)] public byte[] bot_payload;
+ /// For paid media transactions », message ID of the paid media posted to peer.peer (can point to a deleted message; either way, extended_media will always contain the bought media).
[IfFlag(8)] public int msg_id;
+ /// The purchased paid media ».
[IfFlag(9)] public MessageMedia[] extended_media;
[Flags] public enum Flags : uint
@@ -18747,9 +18812,11 @@ namespace TL
has_photo = 0x4,
/// Whether this transaction is a refund.
refund = 0x8,
+ /// The transaction is currently pending.
pending = 0x10,
/// Fields and have a value
has_transaction_date = 0x20,
+ /// This transaction has failed.
failed = 0x40,
/// Field has a value
has_bot_payload = 0x80,
@@ -18757,6 +18824,7 @@ namespace TL
has_msg_id = 0x100,
/// Field has a value
has_extended_media = 0x200,
+ /// This transaction was a gift from the user in peer.peer.
gift = 0x400,
}
}
@@ -18787,148 +18855,195 @@ namespace TL
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
}
- /// See
+ /// A story found using global story search ». See
[TLDef(0xE87ACBC0)]
public sealed partial class FoundStory : IObject
{
+ /// The peer that posted the story.
public Peer peer;
+ /// The story.
public StoryItemBase story;
}
- /// See
+ /// Stories found using global story search ». See
[TLDef(0xE2DE7737)]
public sealed partial class Stories_FoundStories : IObject, IPeerResolver
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Total number of results found for the query.
public int count;
+ /// Matching stories.
public FoundStory[] stories;
+ /// Offset used to fetch the next page, if not set this is the final page.
[IfFlag(0)] public string next_offset;
+ /// Mentioned chats
public Dictionary chats;
+ /// Mentioned users
public Dictionary users;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_next_offset = 0x1,
}
/// returns a or for the given Peer
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
}
- /// See
+ /// Address optionally associated to a . See
[TLDef(0xDE4C5D93)]
public sealed partial class GeoPointAddress : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Two-letter ISO 3166-1 alpha-2 country code
public string country_iso2;
+ /// State
[IfFlag(0)] public string state;
+ /// City
[IfFlag(1)] public string city;
+ /// Street
[IfFlag(2)] public string street;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_state = 0x1,
+ /// Field has a value
has_city = 0x2,
+ /// Field has a value
has_street = 0x4,
}
}
- /// See
+ /// Describes Telegram Star revenue balances ». See
[TLDef(0x79342946)]
public sealed partial class StarsRevenueStatus : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Amount of not-yet-withdrawn Telegram Stars.
public long current_balance;
+ /// Amount of withdrawable Telegram Stars.
public long available_balance;
+ /// Total amount of earned Telegram Stars.
public long overall_revenue;
+ /// Unixtime indicating when will withdrawal be available to the user. If not set, withdrawal can be started now.
[IfFlag(1)] public int next_withdrawal_at;
[Flags] public enum Flags : uint
{
+ /// If set, the user may withdraw up to available_balance stars.
withdrawal_enabled = 0x1,
+ /// Field has a value
has_next_withdrawal_at = 0x2,
}
}
- /// See
+ /// Star revenue statistics, see here » for more info. See
[TLDef(0xC92BB73B)]
public sealed partial class Payments_StarsRevenueStats : IObject
{
+ /// Star revenue graph (number of earned stars)
public StatsGraphBase revenue_graph;
+ /// Current balance, current withdrawable balance and overall earned Telegram Stars
public StarsRevenueStatus status;
+ /// Current conversion rate of Telegram Stars to USD
public double usd_rate;
}
- /// See
+ /// Contains the URL to use to withdraw Telegram Star revenue. See
[TLDef(0x1DAB80B7)]
public sealed partial class Payments_StarsRevenueWithdrawalUrl : IObject
{
+ /// Contains the URL to use to withdraw Telegram Star revenue.
public string url;
}
- /// See
+ /// Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars. See
[TLDef(0x394E7F21)]
public sealed partial class Payments_StarsRevenueAdsAccountUrl : IObject
{
+ /// URL to open.
public string url;
}
- /// See
+ /// Used to fetch info about a Telegram Star transaction ». See
[TLDef(0x206AE6D1)]
public sealed partial class InputStarsTransaction : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Transaction ID.
public string id;
[Flags] public enum Flags : uint
{
+ /// If set, fetches info about the refund transaction for this transaction.
refund = 0x1,
}
}
- /// See
+ /// Telegram Stars gift option. See
[TLDef(0x5E0589F1)]
public sealed partial class StarsGiftOption : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Amount of Telegram stars.
public long stars;
+ /// Identifier of the store product associated with the option, official apps only.
[IfFlag(0)] public string store_product;
+ /// 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;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_store_product = 0x1,
+ /// If set, the option must only be shown in the full list of topup options.
extended = 0x2,
}
}
- /// See
+ /// Popular Main Mini Apps, to be used in the apps tab of global search ». See
[TLDef(0x1991B13B)]
public sealed partial class Bots_PopularAppBots : IObject
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
+ /// Offset for pagination.
[IfFlag(0)] public string next_offset;
+ /// The bots associated to each Main Mini App, see here » for more info.
public Dictionary users;
[Flags] public enum Flags : uint
{
+ /// Field has a value
has_next_offset = 0x1,
}
}
- /// See
+ /// Represents a Main Mini App preview media, see here » for more info. See
[TLDef(0x23E91BA3)]
public sealed partial class BotPreviewMedia : IObject
{
+ /// When was this media last updated.
public DateTime date;
+ /// The actual photo/video.
public MessageMedia media;
}
- /// See
+ /// Contains info about Main Mini App previews, see here » for more info. See
[TLDef(0x0CA71D64)]
public sealed partial class Bots_PreviewInfo : IObject
{
+ /// All preview medias for the language code passed to Bots_GetPreviewInfo.
public BotPreviewMedia[] media;
+ /// All available language codes for which preview medias were uploaded (regardless of the language code passed to Bots_GetPreviewInfo).
public string[] lang_codes;
}
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 1c5ddc9..3b07b98 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -33,10 +33,10 @@ namespace TL
/// Operation system version
/// Application version
/// Code for the language used on the device's OS, ISO 639-1 standard
- /// Language pack to use
- /// Code for the language used on the client, ISO 639-1 standard
+ /// Platform identifier (i.e. android, tdesktop, etc).
+ /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link.
/// Info about an MTProto proxy
- /// Additional initConnection parameters.
For now, only the tz_offset field is supported, for specifying timezone offset in seconds.
+ /// Additional initConnection parameters.
For now, only the tz_offset field is supported, for specifying the timezone offset in seconds.
/// The query itself
public static Task InitConnection(this Client client, int api_id, string device_model, string system_version, string app_version, string system_lang_code, string lang_pack, string lang_code, IMethod query, InputClientProxy proxy = null, JSONValue params_ = null)
=> client.Invoke(new InitConnection
@@ -1557,6 +1557,7 @@ namespace TL
/// Chats to which the users often forwards messages to
/// Often-opened groups and supergroups
/// Most frequently visited channels
+ /// Most frequently used Main Mini Bot Apps.
/// Offset for pagination
/// Maximum number of results to return, see pagination
/// Hash used for caching, for more info click here
@@ -2547,6 +2548,7 @@ namespace TL
/// The draft
/// Message entities for styled text
/// Attached media
+ /// Specifies a message effect » to use for the message.
public static Task Messages_SaveDraft(this Client client, InputPeer peer, string message, MessageEntity[] entities = null, InputReplyTo reply_to = null, InputMedia media = null, long? effect = null, bool no_webpage = false, bool invert_media = false)
=> client.Invoke(new Messages_SaveDraft
{
@@ -3700,6 +3702,7 @@ namespace TL
/// Open a bot mini app, sending over user information after user confirmation. See Possible codes: 400,403 (details)
/// Whether the webview was opened by clicking on the bot's menu button ».
/// Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is Messages_SendWebViewResultMessage should be sent silently (no notifications for the receivers).
+ /// If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the attachment menu deep link is equal to compact.
/// Dialog where the web app is being opened, and where the resulting message will be sent (see the docs for more info »).
/// Bot that owns the web app
/// Web app URL
@@ -3742,10 +3745,11 @@ namespace TL
/// Open a bot mini app. See Possible codes: 400 (details)
/// Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by Messages_GetInlineBotResults.
- /// Set this flag if opening the Mini App from the installed side menu entry » or from a Mini App link ».
+ /// Set this flag if opening the Mini App from the installed side menu entry ».
+ /// Deprecated.
/// Bot that owns the mini app
/// Web app URL, if opening from a keyboard button or inline result
- /// Start parameter, if opening from a Mini App link ».
+ /// Deprecated.
/// Theme parameters »
/// Short name of the application; 0-64 English letters, digits, and underscores
public static Task Messages_RequestSimpleWebView(this Client client, InputUserBase bot, string platform, DataJSON theme_params = null, string url = null, string start_param = null, bool from_switch_webview = false, bool from_side_menu = false, bool compact = false)
@@ -3872,9 +3876,9 @@ namespace TL
{
});
- /// Get information about extended media See
- /// Peer
- /// Message IDs
+ /// Fetch updated information about paid media, see here » for the full flow. See
+ /// Peer with visible paid media messages.
+ /// IDs of currently visible messages containing paid media.
public static Task Messages_GetExtendedMedia(this Client client, InputPeer peer, params int[] id)
=> client.Invoke(new Messages_GetExtendedMedia
{
@@ -3970,6 +3974,7 @@ namespace TL
/// Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation. See Possible codes: 400 (details)
/// Set this flag if the bot is asking permission to send messages to the user as specified in the direct Mini App deep link docs, and the user agreed.
+ /// If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the direct Mini App deep link is equal to compact.
/// If the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead.
/// The app obtained by invoking Messages_GetBotApp as specified in the direct Mini App deep link docs.
/// If the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param.
@@ -4287,7 +4292,13 @@ namespace TL
msg_id = msg_id,
});
- /// See
+ /// Open a Main Mini App. See Possible codes: 400 (details)
+ /// If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the Main Mini App link is equal to compact.
+ /// Currently open chat, may be if no chat is currently open.
+ /// Bot that owns the main mini app.
+ /// Start parameter, if opening from a Main Mini App link ».
+ /// Theme parameters »
+ /// Short name of the application; 0-64 English letters, digits, and underscores
public static Task Messages_RequestMainWebView(this Client client, InputPeer peer, InputUserBase bot, string platform, DataJSON theme_params = null, string start_param = null, bool compact = false)
=> client.Invoke(new Messages_RequestMainWebView
{
@@ -4486,7 +4497,7 @@ namespace TL
request_token = request_token,
});
- /// Get SHA256 hashes for verifying downloaded CDN files See [bots: ✓] Possible codes: 400,500 (details)
+ /// Get SHA256 hashes for verifying downloaded CDN files See [bots: ✓] Possible codes: 400 (details)
/// File
/// Offset from which to start getting hashes
public static Task Upload_GetCdnFileHashes(this Client client, byte[] file_token, long offset = default)
@@ -5586,7 +5597,9 @@ namespace TL
params_ = params_,
});
- /// See
+ /// Fetch popular Main Mini Apps, to be used in the apps tab of global search ». See
+ /// Offset for pagination, initially an empty string, then re-use the next_offset returned by the previous query.
+ /// Maximum number of results to return, see pagination
public static Task Bots_GetPopularAppBots(this Client client, string offset, int limit = int.MaxValue)
=> client.Invoke(new Bots_GetPopularAppBots
{
@@ -5594,7 +5607,10 @@ namespace TL
limit = limit,
});
- /// See
+ /// Add a main mini app preview, see here » for more info. See Possible codes: 400 (details)
+ /// The bot that owns the Main Mini App.
+ /// ISO 639-1 language code, indicating the localization of the preview to add.
+ /// The photo/video preview, uploaded using Messages_UploadMedia.
public static Task Bots_AddPreviewMedia(this Client client, InputUserBase bot, string lang_code, InputMedia media)
=> client.Invoke(new Bots_AddPreviewMedia
{
@@ -5603,7 +5619,11 @@ namespace TL
media = media,
});
- /// See
+ /// Edit a main mini app preview, see here » for more info. See Possible codes: 400 (details)
+ /// The bot that owns the Main Mini App.
+ /// ISO 639-1 language code, indicating the localization of the preview to edit.
+ /// The photo/video preview to replace, previously fetched as specified here ».
+ /// The new photo/video preview, uploaded using Messages_UploadMedia.
public static Task Bots_EditPreviewMedia(this Client client, InputUserBase bot, string lang_code, InputMedia media, InputMedia new_media)
=> client.Invoke(new Bots_EditPreviewMedia
{
@@ -5613,7 +5633,10 @@ namespace TL
new_media = new_media,
});
- /// See
+ /// Delete a main mini app preview, see here » for more info. See Possible codes: 400 (details)
+ /// The bot that owns the Main Mini App.
+ /// ISO 639-1 language code, indicating the localization of the preview to delete.
+ /// The photo/video preview to delete, previously fetched as specified here ».
public static Task Bots_DeletePreviewMedia(this Client client, InputUserBase bot, string lang_code, params InputMedia[] media)
=> client.Invoke(new Bots_DeletePreviewMedia
{
@@ -5622,7 +5645,10 @@ namespace TL
media = media,
});
- /// See
+ /// Reorder a main mini app previews, see here » for more info. See Possible codes: 400 (details)
+ /// The bot that owns the Main Mini App.
+ /// ISO 639-1 language code, indicating the localization of the previews to reorder.
+ /// New order of the previews.
public static Task Bots_ReorderPreviewMedias(this Client client, InputUserBase bot, string lang_code, params InputMedia[] order)
=> client.Invoke(new Bots_ReorderPreviewMedias
{
@@ -5631,7 +5657,9 @@ namespace TL
order = order,
});
- /// See
+ /// Bot owners only, fetch main mini app preview information, see here » for more info. See Possible codes: 400 (details)
+ /// The bot that owns the Main Mini App.
+ /// Fetch previews for the specified ISO 639-1 language code.
public static Task Bots_GetPreviewInfo(this Client client, InputUserBase bot, string lang_code)
=> client.Invoke(new Bots_GetPreviewInfo
{
@@ -5639,7 +5667,8 @@ namespace TL
lang_code = lang_code,
});
- /// See
+ /// Fetch main mini app previews, see here » for more info. See Possible codes: 400 (details)
+ /// The bot that owns the Main Mini App.
public static Task Bots_GetPreviewMedias(this Client client, InputUserBase bot)
=> client.Invoke(new Bots_GetPreviewMedias
{
@@ -5749,7 +5778,7 @@ namespace TL
purpose = purpose,
});
- /// Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only. See
+ /// Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only. See Possible codes: 406 (details)
/// Payment purpose
public static Task Payments_CanPurchasePremium(this Client client, InputStorePaymentPurpose purpose)
=> client.Invoke(new Payments_CanPurchasePremium
@@ -5804,7 +5833,7 @@ namespace TL
purpose = purpose,
});
- /// Obtain a list of Telegram Stars topup options » as s. See
+ /// Obtain a list of Telegram Stars topup options » as s. See
public static Task Payments_GetStarsTopupOptions(this Client client)
=> client.Invoke(new Payments_GetStarsTopupOptions
{
@@ -5821,8 +5850,10 @@ namespace TL
/// Fetch Telegram Stars transactions. See [bots: ✓] Possible codes: 400 (details)
/// If set, fetches only incoming transactions.
/// If set, fetches only outgoing transactions.
+ /// Return transactions in ascending order by date (instead of descending order by date).
/// Fetch the transaction history of the peer ( or a bot we own).
/// Offset for pagination, obtained from the returned next_offset, initially an empty string ».
+ /// Maximum number of results to return, see pagination
public static Task Payments_GetStarsTransactions(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, bool inbound = false, bool outbound = false, bool ascending = false)
=> client.Invoke(new Payments_GetStarsTransactions
{
@@ -5853,7 +5884,9 @@ namespace TL
charge_id = charge_id,
});
- /// See
+ /// Get Telegram Star revenue statistics ». See Possible codes: 400 (details)
+ /// Whether to enable dark theme for graph colors
+ /// Get statistics for the specified bot, channel or ourselves ().
public static Task Payments_GetStarsRevenueStats(this Client client, InputPeer peer, bool dark = false)
=> client.Invoke(new Payments_GetStarsRevenueStats
{
@@ -5861,7 +5894,10 @@ namespace TL
peer = peer,
});
- /// See
+ /// Withdraw funds from a channel or bot's star balance ». See Possible codes: 400 (details)
+ /// Channel or bot from which to withdraw funds.
+ /// Amount of stars to withdraw.
+ /// 2FA password, see here » for more info.
public static Task Payments_GetStarsRevenueWithdrawalUrl(this Client client, InputPeer peer, long stars, InputCheckPasswordSRP password)
=> client.Invoke(new Payments_GetStarsRevenueWithdrawalUrl
{
@@ -5870,14 +5906,17 @@ namespace TL
password = password,
});
- /// See
+ /// Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer, paid using the Telegram Stars owned by the specified peer, see here » for more info. See Possible codes: 400 (details)
+ /// Channel or bot that owns the stars.
public static Task Payments_GetStarsRevenueAdsAccountUrl(this Client client, InputPeer peer)
=> client.Invoke(new Payments_GetStarsRevenueAdsAccountUrl
{
peer = peer,
});
- /// See
+ /// Obtain info about Telegram Star transactions » using specific transaction IDs. See Possible codes: 400 (details)
+ /// Channel or bot.
+ /// Transaction IDs.
public static Task Payments_GetStarsTransactionsByID(this Client client, InputPeer peer, params InputStarsTransaction[] id)
=> client.Invoke(new Payments_GetStarsTransactionsByID
{
@@ -5885,7 +5924,8 @@ namespace TL
id = id,
});
- /// See
+ /// Obtain a list of Telegram Stars gift options » as s. See
+ /// Receiver of the gift (optional).
public static Task Payments_GetStarsGiftOptions(this Client client, InputUserBase user_id = null)
=> client.Invoke(new Payments_GetStarsGiftOptions
{
@@ -5893,7 +5933,7 @@ namespace TL
user_id = user_id,
});
- /// Create a stickerset, bots only. See [bots: ✓] Possible codes: 400 (details)
+ /// Create a stickerset. See [bots: ✓] Possible codes: 400 (details)
/// Whether this is a mask stickerset
/// Whether this is a custom emoji stickerset.
/// Whether the color of TGS custom emojis contained in this set should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. For custom emoji stickersets only.
@@ -5916,7 +5956,7 @@ namespace TL
software = software,
});
- /// Remove a sticker from the set where it belongs, bots only. The sticker set must have been created by the bot. See [bots: ✓] Possible codes: 400 (details)
+ /// Remove a sticker from the set where it belongs. The sticker set must have been created by the current user/bot. See [bots: ✓] Possible codes: 400 (details)
/// The sticker to remove
/// a null value means messages.stickerSetNotModified
public static Task Stickers_RemoveStickerFromSet(this Client client, InputDocument sticker)
@@ -5925,7 +5965,7 @@ namespace TL
sticker = sticker,
});
- /// Changes the absolute position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot See [bots: ✓] Possible codes: 400 (details)
+ /// Changes the absolute position of a sticker in the set to which it belongs. The sticker set must have been created by the current user/bot. See [bots: ✓] Possible codes: 400 (details)
/// The sticker
/// The new position of the sticker, zero-based
/// a null value means messages.stickerSetNotModified
@@ -5936,7 +5976,7 @@ namespace TL
position = position,
});
- /// Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot. See [bots: ✓] Possible codes: 400,406 (details)
+ /// Add a sticker to a stickerset. The sticker set must have been created by the current user/bot. See [bots: ✓] Possible codes: 400,406 (details)
/// The stickerset
/// The sticker
/// a null value means messages.stickerSetNotModified
@@ -5977,7 +6017,7 @@ namespace TL
title = title,
});
- /// Update the keywords, emojis or mask coordinates of a sticker, bots only. See [bots: ✓] Possible codes: 400 (details)
+ /// Update the keywords, emojis or mask coordinates of a sticker. See [bots: ✓] Possible codes: 400 (details)
/// The sticker
/// If set, updates the emoji list associated to the sticker
/// If set, updates the mask coordinates
@@ -5993,7 +6033,7 @@ namespace TL
keywords = keywords,
});
- /// Renames a stickerset, bots only. See [bots: ✓] Possible codes: 400 (details)
+ /// Renames a stickerset. See [bots: ✓] Possible codes: 400 (details)
/// Stickerset to rename
/// New stickerset title
/// a null value means messages.stickerSetNotModified
@@ -6004,7 +6044,7 @@ namespace TL
title = title,
});
- /// Deletes a stickerset we created, bots only. See [bots: ✓] Possible codes: 400 (details)
+ /// Deletes a stickerset we created. See [bots: ✓] Possible codes: 400 (details)
/// Stickerset to delete
public static Task Stickers_DeleteStickerSet(this Client client, InputStickerSet stickerset)
=> client.Invoke(new Stickers_DeleteStickerSet
@@ -6379,8 +6419,8 @@ namespace TL
});
/// Get localization pack strings See Possible codes: 400 (details)
- /// Language pack name, usually obtained from a language pack link
- /// Language code
+ /// Platform identifier (i.e. android, tdesktop, etc).
+ /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link.
public static Task Langpack_GetLangPack(this Client client, string lang_pack, string lang_code)
=> client.Invoke(new Langpack_GetLangPack
{
@@ -6389,8 +6429,8 @@ namespace TL
});
/// Get strings from a language pack See Possible codes: 400 (details)
- /// Language pack name, usually obtained from a language pack link
- /// Language code
+ /// Platform identifier (i.e. android, tdesktop, etc).
+ /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link.
/// Strings to get
public static Task Langpack_GetStrings(this Client client, string lang_pack, string lang_code, params string[] keys)
=> client.Invoke(new Langpack_GetStrings
@@ -6401,8 +6441,8 @@ namespace TL
});
/// Get new strings in language pack See Possible codes: 400 (details)
- /// Language pack
- /// Language code
+ /// Platform identifier (i.e. android, tdesktop, etc).
+ /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link.
/// Previous localization pack version
public static Task Langpack_GetDifference(this Client client, string lang_pack, string lang_code, int from_version)
=> client.Invoke(new Langpack_GetDifference
@@ -6413,7 +6453,7 @@ namespace TL
});
/// Get information about all languages in a localization pack See Possible codes: 400 (details)
- /// Language pack
+ /// Platform identifier (i.e. android, tdesktop, etc).
public static Task Langpack_GetLanguages(this Client client, string lang_pack)
=> client.Invoke(new Langpack_GetLanguages
{
@@ -6421,8 +6461,8 @@ namespace TL
});
/// Get information about a language in a localization pack See Possible codes: 400 (details)
- /// Language pack name, usually obtained from a language pack link
- /// Language code
+ /// Platform identifier (i.e. android, tdesktop, etc).
+ /// Either an ISO 639-1 language code or a language pack name obtained from a language pack link.
public static Task Langpack_GetLanguage(this Client client, string lang_pack, string lang_code)
=> client.Invoke(new Langpack_GetLanguage
{
@@ -6957,7 +6997,11 @@ namespace TL
id = id,
});
- /// See
+ /// Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow. See Possible codes: 400 (details)
+ /// Hashtag (without the #)
+ /// A or a .
Note areas may be searched only if they have an associated address.
+ /// Offset for pagination: initially an empty string, then the next_offset from the previously returned .
+ /// Maximum number of results to return, see pagination
public static Task Stories_SearchPosts(this Client client, string offset, int limit = int.MaxValue, string hashtag = null, MediaArea area = null)
=> client.Invoke(new Stories_SearchPosts
{