diff --git a/FAQ.md b/FAQ.md
index e243a33..89c084b 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -188,6 +188,30 @@ In this case, the recommended action would be to dispose the client and recreate
you might also get Connection shutdown because your client couldn't send Pings to Telegram in the alloted time.
In this case, you can use the `PingInterval` property to increase the delay between pings *(for example 300 seconds instead of 60)*.
+
+#### 11. How to migrate from TLSharp? How to sign-in/sign-up/register account?
+
+First, make sure you read the [ReadMe documentation](README.md) completely, it contains essential information and a quick tutorial to easily understand how to correctly use the library.
+
+WTelegramClient approach is much more simpler and secure than TLSharp.
+
+All client APIs have dedicated async methods that you can call like this: `await client.Method_Name(param1, param2, ...)`
+See the [full method list](https://core.telegram.org/methods) (just replace the dot with an underscore in the names)
+
+A session file is created or resumed automatically on startup, and maintained up-to-date automatically throughout the session.
+That session file is incompatible with TLSharp so you cannot reuse a TLSharp .dat file. You'll need to create a new session.
+
+You don't have to call methods Auth_SignIn/SignUp/.. manually anymore because all the login phase is handled automatically by calling `await client.LoginUserIfNeeded()` after creating the client.
+Your Config callback just need to provide the various login answers if they are needed.
+In particular, it will detect and handle automatically the various login cases/particularity like:
+* Login not necessary (when a session is resumed with an already logged-in user)
+* 2FA password required (your Config needs to provide "password")
+* Account registration/sign-up required (your Config needs to provide "first_name", "last_name")
+* Request to resend the verification code through alternate ways like SMS (if your Config answer an empty "verification_code" initially)
+* Transient failures, slowness to respond, check for encryption key safety, etc..
+
+Contrary to TLSharp, WTelegram supports MTProto v2.0, protocol security checks, transport obfuscation, MTProto Proxy, real-time updates, multiple DC connections, API documentation in Intellisense...
+
## Troubleshooting guide
diff --git a/README.md b/README.md
index 87bdc35..ec41e9b 100644
--- a/README.md
+++ b/README.md
@@ -5,15 +5,15 @@
[](https://t.me/WTelegramClient)
[](http://wizou.fr/donate.html)
-## _a Telegram Client API library written 100% in C# and .NET Standard_
+## _Telegram Client API library written 100% in C# and .NET Standard_
This ReadMe is a quick but important tutorial to learn the fundamentals about this library. Please read it all.
-# How to use
-
>⚠️ This library relies on asynchronous C# programming (`async/await`) so make sure you are familiar with this advanced topic before proceeding.
>If you are a beginner in C#, starting a project based on this library might not be a great idea.
+# How to use
+
After installing WTelegramClient through Nuget, your first Console program will be as simple as:
```csharp
static async Task Main(string[] _)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index f68e5af..d551346 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -896,6 +896,7 @@ namespace TL
call_active = 0x800000,
/// Whether there's anyone in the group call
call_not_empty = 0x1000000,
+ /// Whether this group is protected, thus does not allow forwarding messages from it
noforwards = 0x2000000,
}
@@ -993,6 +994,7 @@ namespace TL
fake = 0x2000000,
/// Whether this supergroup is a gigagroup
gigagroup = 0x4000000,
+ /// Whether this channel or group is protected, thus does not allow forwarding messages from it
noforwards = 0x8000000,
}
@@ -1059,8 +1061,11 @@ namespace TL
public abstract Peer GroupcallDefaultJoinAs { get; }
/// Emoji representing a specific chat theme
public abstract string ThemeEmoticon { get; }
+ /// Pending join requests
public abstract int RequestsPending { get; }
+ /// IDs of users who requested to join recently
public abstract long[] RecentRequesters { get; }
+ /// Allowed message reactions
public abstract string[] AvailableReactions { get; }
}
/// Detailed chat info See
@@ -1095,8 +1100,11 @@ namespace TL
[IfFlag(15)] public Peer groupcall_default_join_as;
/// Emoji representing a specific chat theme
[IfFlag(16)] public string theme_emoticon;
+ /// Pending join requests
[IfFlag(17)] public int requests_pending;
+ /// IDs of users who requested to join recently
[IfFlag(17)] public long[] recent_requesters;
+ /// Allowed message reactions
[IfFlag(18)] public string[] available_reactions;
[Flags] public enum Flags : uint
@@ -1153,8 +1161,11 @@ namespace TL
public override Peer GroupcallDefaultJoinAs => groupcall_default_join_as;
/// Emoji representing a specific chat theme
public override string ThemeEmoticon => theme_emoticon;
+ /// Pending join requests
public override int RequestsPending => requests_pending;
+ /// IDs of users who requested to join recently
public override long[] RecentRequesters => recent_requesters;
+ /// Allowed message reactions
public override string[] AvailableReactions => available_reactions;
}
/// Full info about a channel/supergroup See
@@ -1225,9 +1236,13 @@ namespace TL
[IfFlag(26)] public Peer groupcall_default_join_as;
/// Emoji representing a specific chat theme
[IfFlag(27)] public string theme_emoticon;
+ /// Pending join requests
[IfFlag(28)] public int requests_pending;
+ /// IDs of users who requested to join recently
[IfFlag(28)] public long[] recent_requesters;
+ /// Default peer used for sending messages to this channel
[IfFlag(29)] public Peer default_send_as;
+ /// Allowed message reactions
[IfFlag(30)] public string[] available_reactions;
[Flags] public enum Flags : uint
@@ -1320,8 +1335,11 @@ namespace TL
public override Peer GroupcallDefaultJoinAs => groupcall_default_join_as;
/// Emoji representing a specific chat theme
public override string ThemeEmoticon => theme_emoticon;
+ /// Pending join requests
public override int RequestsPending => requests_pending;
+ /// IDs of users who requested to join recently
public override long[] RecentRequesters => recent_requesters;
+ /// Allowed message reactions
public override string[] AvailableReactions => available_reactions;
}
@@ -1507,6 +1525,7 @@ namespace TL
[IfFlag(16)] public string post_author;
/// Multiple media messages sent using messages.sendMultiMedia with the same grouped ID indicate an album or media group
[IfFlag(17)] public long grouped_id;
+ /// Reactions to this message
[IfFlag(20)] public MessageReactions reactions;
/// Contains the reason why access to this message must be restricted.
[IfFlag(22)] public RestrictionReason[] restriction_reason;
@@ -1563,6 +1582,7 @@ namespace TL
pinned = 0x1000000,
/// Field has a value
has_ttl_period = 0x2000000,
+ /// Whether this message is protected and thus cannot be forwarded
noforwards = 0x4000000,
}
@@ -2081,6 +2101,7 @@ namespace TL
public int unread_count;
/// Number of unread mentions
public int unread_mentions_count;
+ /// Number of unread reactions to messages you sent
public int unread_reactions_count;
/// Notification settings
public PeerNotifySettings notify_settings;
@@ -2326,6 +2347,7 @@ namespace TL
{
/// Flags, see TL conditional fields
public Flags flags;
+ /// Iff setup_password_required is set, the user will be able to log into their account via SMS only once every this many days.
[IfFlag(1)] public int otherwise_relogin_days;
/// Temporary passport sessions
[IfFlag(0)] public int tmp_sessions;
@@ -2336,6 +2358,7 @@ namespace TL
{
/// Field has a value
has_tmp_sessions = 0x1,
+ /// Suggests the user to set up a 2-step verification password to be able to log in again
setup_password_required = 0x2,
}
}
@@ -2575,6 +2598,7 @@ namespace TL
{
/// Flags, see TL conditional fields
public Flags flags;
+ /// User ID
public long id;
/// Bio of the user
[IfFlag(1)] public string about;
@@ -5602,7 +5626,9 @@ namespace TL
official_app = 0x2,
/// Whether the session is still waiting for a 2FA password
password_pending = 0x4,
+ /// Whether this session will accept encrypted chats
encrypted_requests_disabled = 0x8,
+ /// Whether this session will accept phone calls
call_requests_disabled = 0x10,
}
}
@@ -5611,6 +5637,7 @@ namespace TL
[TLDef(0x4BFF8EA0)]
public class Account_Authorizations : IObject
{
+ /// Time-to-live of session
public int authorization_ttl_days;
/// Logged-in sessions
public Authorization[] authorizations;
@@ -6084,19 +6111,23 @@ namespace TL
has_quiz = 0x1,
}
}
- /// See
+ /// Button that links directly to a user profile See
[TLDef(0xE988037B)]
public class InputKeyboardButtonUserProfile : KeyboardButtonBase
{
+ /// Button text
public string text;
+ /// User ID
public InputUserBase user_id;
+ /// Button text
public override string Text => text;
}
- /// See
+ /// Button that links directly to a user profile See
[TLDef(0x308660C1, inheritBefore = true)]
public class KeyboardButtonUserProfile : KeyboardButton
{
+ /// User ID
public long user_id;
}
@@ -6254,7 +6285,7 @@ namespace TL
/// Indicates a credit card number See
[TLDef(0x761E6AF4)]
public class MessageEntityBankCard : MessageEntity { }
- /// See
+ /// Message entity representing a spoiler See
[TLDef(0x32CA960F)]
public class MessageEntitySpoiler : MessageEntity { }
@@ -7274,7 +7305,7 @@ namespace TL
Call = 0x741CD3E3,
///Type of verification code that will be sent next if you call the resendCode method: SMS code
FlashCall = 0x226CCEFB,
- ///See
+ ///The next time, the authentication code will be delivered via an immediately canceled incoming call, handled manually by the user.
MissedCall = 0xD61AD6EE,
}
@@ -7308,10 +7339,11 @@ namespace TL
/// pattern to match
public string pattern;
}
- /// See
+ /// The code will be sent via a flash phone call, that will be closed immediately. The last digits of the phone number that calls are the code that must be entered manually by the user. See
[TLDef(0x82006484)]
public class Auth_SentCodeTypeMissedCall : Auth_SentCodeTypeCall
{
+ /// Prefix of the phone number from which the call will be made
public string prefix;
}
@@ -9344,30 +9376,36 @@ namespace TL
/// New value
public int new_value;
}
- /// See
+ /// A new member was accepted to the chat by an admin See
[TLDef(0xAFB6144A)]
public class ChannelAdminLogEventActionParticipantJoinByRequest : ChannelAdminLogEventAction
{
+ /// The invite link that was used to join the chat
public ExportedChatInvite invite;
+ /// ID of the admin that approved the invite
public long approved_by;
}
- /// See
+ /// Forwards were enabled or disabled See
[TLDef(0xCB2AC766)]
public class ChannelAdminLogEventActionToggleNoForwards : ChannelAdminLogEventAction
{
+ /// Old value
public bool new_value;
}
- /// See
+ /// A message was sent See
[TLDef(0x278F2868)]
public class ChannelAdminLogEventActionSendMessage : ChannelAdminLogEventAction
{
+ /// The message that was sent
public MessageBase message;
}
- /// See
+ /// The set of allowed message reactions for this channel has changed See
[TLDef(0x9CF7F76A)]
public class ChannelAdminLogEventActionChangeAvailableReactions : ChannelAdminLogEventAction
{
+ /// Previously allowed reaction emojis
public string[] prev_value;
+ /// New allowed reaction emojis
public string[] new_value;
}
@@ -9440,6 +9478,7 @@ namespace TL
group_call = 0x4000,
/// Invite events
invites = 0x8000,
+ /// New value
send = 0x10000,
}
}
@@ -11017,6 +11056,7 @@ namespace TL
[IfFlag(2)] public DocumentBase document;
/// Theme settings
[IfFlag(3)] public ThemeSettings[] settings;
+ /// Theme emoji
[IfFlag(6)] public string emoticon;
/// Installation count
[IfFlag(4)] public int installs_count;
@@ -12317,8 +12357,11 @@ namespace TL
public byte[] random_id;
/// ID of the sender of the message
[IfFlag(3)] public Peer from_id;
+ /// Information about the chat invite hash specified in chat_invite_hash
[IfFlag(4)] public ChatInviteBase chat_invite;
+ /// Chat invite
[IfFlag(4)] public string chat_invite_hash;
+ /// Optional link to a channel post if from_id points to a channel
[IfFlag(2)] public int channel_post;
/// Parameter for the bot start message if the sponsored chat is a chat with a bot.
[IfFlag(0)] public string start_param;
@@ -12366,23 +12409,27 @@ namespace TL
public int count;
}
- /// See
+ /// Information about found messages sent on a specific day See
[TLDef(0x147EE23C)]
public class Messages_SearchResultsCalendar : IObject, IPeerResolver
{
/// Flags, see TL conditional fields
public Flags flags;
+ /// Total number of results matching query
public int count;
public DateTime min_date;
public int min_msg_id;
[IfFlag(1)] public int offset_id_offset;
public SearchResultsCalendarPeriod[] periods;
public MessageBase[] messages;
+ /// Mentioned chats
public Dictionary chats;
+ /// Mentioned users
public Dictionary users;
[Flags] public enum Flags : uint
{
+ /// If set, indicates that the results may be inexact
inexact = 0x1,
/// Field has a value
has_offset_id_offset = 0x2,
@@ -12391,7 +12438,7 @@ namespace TL
public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats);
}
- /// Derived classes: See
+ /// Information about a message in a specific position Derived classes: See
public abstract class SearchResultsPosition : IObject { }
/// See
[TLDef(0x7F648B67)]
@@ -12410,45 +12457,55 @@ namespace TL
public SearchResultsPosition[] positions;
}
- /// See
+ /// A list of peers that can be used to send messages in a specific group See
[TLDef(0x8356CDA9)]
public class Channels_SendAsPeers : IObject, IPeerResolver
{
+ /// Peers that can be used to send messages to the group
public Peer[] peers;
+ /// Mentioned chats
public Dictionary chats;
+ /// Mentioned users
public Dictionary users;
/// returns a or for the given Peer
public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats);
}
- /// See
+ /// Full user information See
[TLDef(0x3B6D152E)]
public class Users_UserFull : IObject, IPeerResolver
{
+ /// Full user information
public UserFull full_user;
+ /// Mentioned chats
public Dictionary chats;
+ /// Mentioned users
public Dictionary users;
/// returns a or for the given Peer
public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats);
}
- /// See
+ /// Peer settings See
[TLDef(0x6880B94D)]
public class Messages_PeerSettings : IObject, IPeerResolver
{
+ /// Peer settings
public PeerSettings settings;
+ /// Mentioned chats
public Dictionary chats;
+ /// Mentioned users
public Dictionary users;
/// returns a or for the given Peer
public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats);
}
- /// See
+ /// Authentication token to be used on subsequent authorizations See
[TLDef(0xC3A2835F)]
public class Auth_LoggedOut : IObject
{
/// Flags, see TL conditional fields
public Flags flags;
+ /// Authentication token to be used on subsequent authorizations
[IfFlag(0)] public byte[] future_auth_token;
[Flags] public enum Flags : uint
@@ -12484,6 +12541,7 @@ namespace TL
public Flags flags;
/// Reactions
public ReactionCount[] results;
+ /// List of recent peers and their reactions
[IfFlag(1)] public MessagePeerReaction[] recent_reactions;
[Flags] public enum Flags : uint
@@ -12492,20 +12550,26 @@ namespace TL
min = 0x1,
/// Field has a value
has_recent_reactions = 0x2,
+ /// Whether messages.getMessageReactionsList can be used to see how each specific peer reacted to the message
can_see_list = 0x4,
}
}
- /// See
+ /// List of peers that reacted to a specific message See
[TLDef(0x31BD492D)]
public class Messages_MessageReactionsList : IObject, IPeerResolver
{
/// Flags, see TL conditional fields
public Flags flags;
+ /// Total number of reactions matching query
public int count;
+ /// List of peers that reacted to a specific message
public MessagePeerReaction[] reactions;
+ /// Mentioned chats
public Dictionary chats;
+ /// Mentioned users
public Dictionary users;
+ /// If set, indicates the next offset to use to load more results by invoking messages.getMessageReactionsList.
[IfFlag(0)] public string next_offset;
[Flags] public enum Flags : uint
@@ -12517,14 +12581,17 @@ namespace TL
public IPeerInfo UserOrChat(Peer peer) => peer.UserOrChat(users, chats);
}
- /// See
+ /// Animations associated with a message reaction See
[TLDef(0xC077EC01)]
public class AvailableReaction : IObject
{
/// Flags, see TL conditional fields
public Flags flags;
+ /// Reaction emoji
public string reaction;
+ /// Reaction description
public string title;
+ /// Static icon for the reaction
public DocumentBase static_icon;
public DocumentBase appear_animation;
public DocumentBase select_animation;
@@ -12535,46 +12602,52 @@ namespace TL
[Flags] public enum Flags : uint
{
+ /// If not set, the reaction can be added to new messages and enabled in chats.
inactive = 0x1,
/// Field has a value
has_around_animation = 0x2,
}
}
- /// See
+ /// Animations and metadata associated with message reactions See
/// a null value means messages.availableReactionsNotModified
[TLDef(0x768E3AAD)]
public class Messages_AvailableReactions : IObject
{
+ /// Hash for pagination, for more info click here
public int hash;
+ /// Animations and metadata associated with message reactions
public AvailableReaction[] reactions;
}
- /// Derived classes: , See
+ /// Translated text, or no result Derived classes: , See
public abstract class Messages_TranslatedText : IObject { }
- /// See
+ /// No translation is available See
[TLDef(0x67CA4737)]
public class Messages_TranslateNoResult : Messages_TranslatedText { }
- /// See
+ /// Translated text See
[TLDef(0xA214F7D0)]
public class Messages_TranslateResultText : Messages_TranslatedText
{
+ /// Translated text
public string text;
}
- /// Message reaction See
+ /// How a certain peer reacted to the message See
[TLDef(0x51B67EFF)]
public class MessagePeerReaction : IObject
{
/// Flags, see TL conditional fields
public Flags flags;
+ /// Peer that reacted to the message
public Peer peer_id;
- /// Reaction (UTF8 emoji)
+ /// Reaction emoji
public string reaction;
[Flags] public enum Flags : uint
{
big = 0x1,
+ /// Whether the reaction wasn't yet marked as read by the current user
unread = 0x2,
}
}
@@ -13419,6 +13492,7 @@ namespace TL
/// Whether to install the dark version
/// Theme to install
/// Theme format, a string that identifies the theming engines supported by the client
+ /// Indicates a basic theme provided by all clients
public static Task Account_InstallTheme(this Client client, bool dark = false, InputThemeBase theme = null, string format = null, BaseTheme base_theme = default)
=> client.Invoke(new Account_InstallTheme
{
@@ -13522,14 +13596,17 @@ namespace TL
hash = hash,
});
- /// See [bots: ✓] Possible codes: 406 (details)
+ /// Set time-to-live of current session See Possible codes: 406 (details)
+ /// Time-to-live of current session in days
public static Task Account_SetAuthorizationTTL(this Client client, int authorization_ttl_days)
=> client.Invoke(new Account_SetAuthorizationTTL
{
authorization_ttl_days = authorization_ttl_days,
});
- /// See [bots: ✓] Possible codes: 400 (details)
+ /// Change authorization settings See Possible codes: 400 (details)
+ /// Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed
+ /// Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed
public static Task Account_ChangeAuthorizationSettings(this Client client, long hash, bool? encrypted_requests_disabled = default, bool? call_requests_disabled = default)
=> client.Invoke(new Account_ChangeAuthorizationSettings
{
@@ -13854,6 +13931,8 @@ namespace TL
/// Whether to delete the message history for all chat participants
/// User or chat, communication history of which will be deleted
/// Maximum ID of message to delete
+ /// Delete all messages newer than this UNIX timestamp
+ /// Delete all messages older than this UNIX timestamp
public static Task Messages_DeleteHistory(this Client client, InputPeer peer, int max_id = default, bool just_clear = false, bool revoke = false, DateTime? min_date = null, DateTime? max_date = null)
=> client.Invoke(new Messages_DeleteHistory
{
@@ -13907,6 +13986,7 @@ namespace TL
/// Reply markup for sending bot buttons
/// Message entities for sending styled text
/// Scheduled message date for scheduled messages
+ /// Send this message as the specified peer
public static Task Messages_SendMessage(this Client client, InputPeer peer, string message, long random_id, bool no_webpage = false, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null)
=> client.Invoke(new Messages_SendMessage
{
@@ -13933,6 +14013,7 @@ namespace TL
/// Reply markup for bot keyboards
/// Message entities for styled text
/// Scheduled message date for scheduled messages
+ /// Send this message as the specified peer
public static Task Messages_SendMedia(this Client client, InputPeer peer, InputMedia media, string message, long random_id, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, int? reply_to_msg_id = null, ReplyMarkup reply_markup = null, MessageEntity[] entities = null, DateTime? schedule_date = null, InputPeer send_as = null)
=> client.Invoke(new Messages_SendMedia
{
@@ -14266,6 +14347,7 @@ namespace TL
/// Get info about a stickerset See [bots: ✓] Possible codes: 406 (details)
/// Stickerset
+ /// Hash for pagination, for more info click here
/// a null value means messages.stickerSetNotModified
public static Task Messages_GetStickerSet(this Client client, InputStickerSet stickerset, int hash = default)
=> client.Invoke(new Messages_GetStickerSet
@@ -14451,6 +14533,7 @@ namespace TL
/// Query ID from messages.getInlineBotResults
/// Result ID from messages.getInlineBotResults
/// Scheduled message date for scheduled messages
+ /// Send this message as the specified peer
public static Task Messages_SendInlineBotResult(this Client client, InputPeer peer, long random_id, long query_id, string id, bool silent = false, bool background = false, bool clear_draft = false, bool hide_via = false, int? reply_to_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null)
=> client.Invoke(new Messages_SendInlineBotResult
{
@@ -14879,6 +14962,7 @@ namespace TL
/// The message to reply to
/// The medias to send
/// Scheduled message date for scheduled messages
+ /// Send this message as the specified peer
public static Task Messages_SendMultiMedia(this Client client, InputPeer peer, InputSingleMedia[] multi_media, bool silent = false, bool background = false, bool clear_draft = false, bool noforwards = false, int? reply_to_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null)
=> client.Invoke(new Messages_SendMultiMedia
{
@@ -15446,7 +15530,11 @@ namespace TL
msg_id = msg_id,
});
- /// See [bots: ✓] Possible codes: (details)
+ /// Get information about messages sent on a specific day See Possible codes: (details)
+ /// Peer where where to search
+ /// Message filter
+ /// Offsets for pagination, for more info click here
+ /// Offsets for pagination, for more info click here
public static Task Messages_GetSearchResultsCalendar(this Client client, InputPeer peer, MessagesFilter filter, int offset_id = default, DateTime offset_date = default)
=> client.Invoke(new Messages_GetSearchResultsCalendar
{
@@ -15456,7 +15544,7 @@ namespace TL
offset_date = offset_date,
});
- /// See [bots: ✓]
+ /// See
public static Task Messages_GetSearchResultsPositions(this Client client, InputPeer peer, MessagesFilter filter, int offset_id = default, int limit = int.MaxValue)
=> client.Invoke(new Messages_GetSearchResultsPositions
{
@@ -15466,7 +15554,7 @@ namespace TL
limit = limit,
});
- /// See [bots: ✓]
+ /// See [bots: ✓] Possible codes: 400 (details)
public static Task Messages_HideChatJoinRequest(this Client client, InputPeer peer, InputUserBase user_id, bool approved = false)
=> client.Invoke(new Messages_HideChatJoinRequest
{
@@ -15475,7 +15563,7 @@ namespace TL
user_id = user_id,
});
- /// See [bots: ✓]
+ /// See
public static Task Messages_HideAllChatJoinRequests(this Client client, InputPeer peer, bool approved = false, string link = null)
=> client.Invoke(new Messages_HideAllChatJoinRequests
{
@@ -15484,7 +15572,7 @@ namespace TL
link = link,
});
- /// See [bots: ✓]
+ /// See
public static Task Messages_ToggleNoForwards(this Client client, InputPeer peer, bool enabled)
=> client.Invoke(new Messages_ToggleNoForwards
{
@@ -15492,7 +15580,9 @@ namespace TL
enabled = enabled,
});
- /// See [bots: ✓] Possible codes: 400 (details)
+ /// Change the default peer that should be used when sending messages to a specific group See Possible codes: 400 (details)
+ /// Group
+ /// The default peer that should be used when sending messages to the group
public static Task Messages_SaveDefaultSendAs(this Client client, InputPeer peer, InputPeer send_as)
=> client.Invoke(new Messages_SaveDefaultSendAs
{
@@ -15500,7 +15590,7 @@ namespace TL
send_as = send_as,
});
- /// Send reaction to message See [bots: ✓] Possible codes: 400 (details)
+ /// Send reaction to message See Possible codes: 400 (details)
/// Peer
/// Message ID to react to
/// Reaction (a UTF8 emoji)
@@ -15523,7 +15613,7 @@ namespace TL
id = id,
});
- /// Get full message reaction list See [bots: ✓]
+ /// Get full message reaction list See
/// Peer
/// Message ID
/// Get only reactions of this type (UTF8 emoji)
@@ -15540,7 +15630,9 @@ namespace TL
limit = limit,
});
- /// See [bots: ✓]
+ /// Change the set of message reactions that can be used in a certain group, supergroup or channel See
+ /// Group where to apply changes
+ /// Allowed reaction emojis
public static Task Messages_SetChatAvailableReactions(this Client client, InputPeer peer, string[] available_reactions)
=> client.Invoke(new Messages_SetChatAvailableReactions
{
@@ -15548,7 +15640,8 @@ namespace TL
available_reactions = available_reactions,
});
- /// See [bots: ✓]
+ /// Obtain available message reactions See
+ /// Hash for pagination, for more info click here
/// a null value means messages.availableReactionsNotModified
public static Task Messages_GetAvailableReactions(this Client client, int hash = default)
=> client.Invoke(new Messages_GetAvailableReactions
@@ -15556,14 +15649,17 @@ namespace TL
hash = hash,
});
- /// See [bots: ✓]
+ /// See
public static Task Messages_SetDefaultReaction(this Client client, string reaction)
=> client.Invoke(new Messages_SetDefaultReaction
{
reaction = reaction,
});
- /// See [bots: ✓]
+ /// Translate a given text See [bots: ✓]
+ /// The text to translate
+ /// Two-letter ISO 639-1 language code of the language from which the message is translated, if not set will be autodetected
+ /// Two-letter ISO 639-1 language code of the language to which the message is translated
public static Task Messages_TranslateText(this Client client, string to_lang, InputPeer peer = null, int? msg_id = null, string text = null, string from_lang = null)
=> client.Invoke(new Messages_TranslateText
{
@@ -15575,7 +15671,13 @@ namespace TL
to_lang = to_lang,
});
- /// See [bots: ✓]
+ /// Get unread reactions to messages you sent See [bots: ✓]
+ /// Peer
+ /// Offsets for pagination, for more info click here
+ /// Offsets for pagination, for more info click here
+ /// Maximum number of results to return, see pagination
+ /// Only return reactions for messages up until this message ID
+ /// Only return reactions for messages starting from this message ID
public static Task Messages_GetUnreadReactions(this Client client, InputPeer peer, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default)
=> client.Invoke(new Messages_GetUnreadReactions
{
@@ -15587,7 +15689,8 @@ namespace TL
min_id = min_id,
});
- /// See [bots: ✓]
+ /// Mark message reactions as read See [bots: ✓]
+ /// Peer
public static Task Messages_ReadReactions(this Client client, InputPeer peer)
=> client.Invoke(new Messages_ReadReactions
{
@@ -15965,6 +16068,7 @@ namespace TL
/// Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup See Possible codes: 400 (details)
/// Supergroup
+ /// Participant whose messages should be reported
/// IDs of spam messages
public static Task Channels_ReportSpam(this Client client, InputChannelBase channel, InputPeer participant, int[] id)
=> client.Invoke(new Channels_ReportSpam
@@ -16328,14 +16432,17 @@ namespace TL
channel = channel,
});
- /// See [bots: ✓] Possible codes: 400 (details)
+ /// Obtains a list of peers that can be used to send messages in a specific group See [bots: ✓] 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
{
peer = peer,
});
- /// See [bots: ✓] Possible codes: 400 (details)
+ /// Delete all messages sent by a specific participant of a given supergroup See [bots: ✓] Possible codes: 400 (details)
+ /// Supergroup
+ /// The participant whose messages should be deleted
public static Task Channels_DeleteParticipantHistory(this Client client, InputChannelBase channel, InputPeer participant)
=> client.Invoke(new Channels_DeleteParticipantHistory
{