mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
parameters MessagesFilter filter are optional
This commit is contained in:
parent
f620514759
commit
aad40cf5df
|
|
@ -122,7 +122,7 @@ namespace WTelegram
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>Search messages with <see href="https://corefork.telegram.org/type/MessagesFilter">filter</see> and text <para>See <a href="https://corefork.telegram.org/method/messages.search"/></para></summary>
|
||||
/// <summary>Search messages in chat with <see href="https://corefork.telegram.org/type/MessagesFilter">filter</see> and text <para>See <a href="https://corefork.telegram.org/method/messages.search"/></para></summary>
|
||||
/// <typeparam name="T">See <see cref="MessagesFilter"/> for a list of possible filter types</typeparam>
|
||||
/// <param name="peer">User or chat, histories with which are searched, or <see langword="null"/> constructor for global search</param>
|
||||
/// <param name="text">Text search request</param>
|
||||
|
|
@ -131,6 +131,14 @@ namespace WTelegram
|
|||
public Task<Messages_MessagesBase> Messages_Search<T>(InputPeer peer, string text = null, int offset_id = 0, int limit = int.MaxValue) where T : MessagesFilter, new()
|
||||
=> this.Messages_Search(peer, text, new T(), offset_id: offset_id, limit: limit);
|
||||
|
||||
/// <summary>Search messages globally with <see href="https://corefork.telegram.org/type/MessagesFilter">filter</see> and text <para>See <a href="https://corefork.telegram.org/method/messages.searchGlobal"/></para></summary>
|
||||
/// <typeparam name="T">See <see cref="MessagesFilter"/> for a list of possible filter types</typeparam>
|
||||
/// <param name="text">Text search request</param>
|
||||
/// <param name="offset_id">Only return messages starting from the specified message ID</param>
|
||||
/// <param name="limit"><a href="https://corefork.telegram.org/api/offsets">Number of results to return</a></param>
|
||||
public Task<Messages_MessagesBase> Messages_SearchGlobal<T>(string text = null, int offset_id = 0, int limit = int.MaxValue) where T : MessagesFilter, new()
|
||||
=> this.Messages_SearchGlobal(text, new T(), offset_id: offset_id, limit: limit);
|
||||
|
||||
/// <summary>Helper function to send a media message more easily</summary>
|
||||
/// <param name="peer">Destination of message (chat group, channel, user chat, etc..) </param>
|
||||
/// <param name="caption">Caption for the media <i>(in plain text)</i> or <see langword="null"/></param>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace TL
|
|||
{
|
||||
/// <summary>User identifier</summary>
|
||||
public long user_id;
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="User"/> constructor</summary>
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="User"/></summary>
|
||||
public long access_hash;
|
||||
}
|
||||
/// <summary>Defines a channel for further interaction. <para>See <a href="https://corefork.telegram.org/constructor/inputPeerChannel"/></para></summary>
|
||||
|
|
@ -59,7 +59,7 @@ namespace TL
|
|||
{
|
||||
/// <summary>Channel identifier</summary>
|
||||
public long channel_id;
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="Channel"/> constructor</summary>
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="Channel"/></summary>
|
||||
public long access_hash;
|
||||
}
|
||||
/// <summary>Defines a <a href="https://corefork.telegram.org/api/min">min</a> user that was seen in a certain message of a certain chat. <para>See <a href="https://corefork.telegram.org/constructor/inputPeerUserFromMessage"/></para></summary>
|
||||
|
|
@ -97,7 +97,7 @@ namespace TL
|
|||
{
|
||||
/// <summary>User identifier</summary>
|
||||
public long user_id;
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="User"/> constructor</summary>
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="User"/></summary>
|
||||
public long access_hash;
|
||||
}
|
||||
/// <summary>Defines a <a href="https://corefork.telegram.org/api/min">min</a> user that was seen in a certain message of a certain chat. <para>See <a href="https://corefork.telegram.org/constructor/inputUserFromMessage"/></para></summary>
|
||||
|
|
@ -501,7 +501,7 @@ namespace TL
|
|||
{
|
||||
/// <summary>Photo identifier</summary>
|
||||
public long id;
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="Photo"/> constructor</summary>
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> value from the <see cref="Photo"/></summary>
|
||||
public long access_hash;
|
||||
/// <summary><a href="https://corefork.telegram.org/api/file_reference">File reference</a></summary>
|
||||
public byte[] file_reference;
|
||||
|
|
@ -537,7 +537,7 @@ namespace TL
|
|||
{
|
||||
/// <summary>Document ID</summary>
|
||||
public long id;
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> parameter from the <see cref="Document"/> constructor</summary>
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> parameter from the <see cref="Document"/></summary>
|
||||
public long access_hash;
|
||||
/// <summary><a href="https://corefork.telegram.org/api/file_reference">File reference</a></summary>
|
||||
public byte[] file_reference;
|
||||
|
|
@ -3099,9 +3099,9 @@ namespace TL
|
|||
{
|
||||
/// <summary>User identifier</summary>
|
||||
public long user_id;
|
||||
/// <summary>New first name. Corresponds to the new value of <strong>real_first_name</strong> field of the <see cref="UserFull"/> constructor.</summary>
|
||||
/// <summary>New first name. Corresponds to the new value of <strong>real_first_name</strong> field of the <see cref="UserFull"/>.</summary>
|
||||
public string first_name;
|
||||
/// <summary>New last name. Corresponds to the new value of <strong>real_last_name</strong> field of the <see cref="UserFull"/> constructor.</summary>
|
||||
/// <summary>New last name. Corresponds to the new value of <strong>real_last_name</strong> field of the <see cref="UserFull"/>.</summary>
|
||||
public string last_name;
|
||||
/// <summary>New username.<br/>Parameter added in <a href="https://corefork.telegram.org/api/layers#layer-18">Layer 18</a>.</summary>
|
||||
public string username;
|
||||
|
|
@ -5086,7 +5086,7 @@ namespace TL
|
|||
{
|
||||
/// <summary>Document ID</summary>
|
||||
public long id;
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> parameter from the <see cref="Document"/> constructor</summary>
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/><strong>access_hash</strong> parameter from the <see cref="Document"/></summary>
|
||||
public long access_hash;
|
||||
/// <summary><a href="https://corefork.telegram.org/api/file_reference">File reference</a></summary>
|
||||
public byte[] file_reference;
|
||||
|
|
@ -6394,7 +6394,7 @@ namespace TL
|
|||
/// <summary>Identifier of the user that was mentioned</summary>
|
||||
public long user_id;
|
||||
}
|
||||
/// <summary>Message entity that can be used to create a user <a href="https://corefork.telegram.org/api/mentions">user mention</a>: received mentions use the <see cref="MessageEntityMentionName"/> constructor, instead. <para>See <a href="https://corefork.telegram.org/constructor/inputMessageEntityMentionName"/></para></summary>
|
||||
/// <summary>Message entity that can be used to create a user <a href="https://corefork.telegram.org/api/mentions">user mention</a>: received mentions use the <see cref="MessageEntityMentionName"/>, instead. <para>See <a href="https://corefork.telegram.org/constructor/inputMessageEntityMentionName"/></para></summary>
|
||||
[TLDef(0x208E68C9, inheritBefore = true)]
|
||||
public class InputMessageEntityMentionName : MessageEntity
|
||||
{
|
||||
|
|
@ -6436,7 +6436,7 @@ namespace TL
|
|||
{
|
||||
/// <summary>Channel ID</summary>
|
||||
public long channel_id;
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash taken from the <see cref="Channel"/> constructor</summary>
|
||||
/// <summary>⚠ <b>REQUIRED FIELD</b>. See <see href="https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash">how to obtain it</see><br/>Access hash taken from the <see cref="Channel"/></summary>
|
||||
public long access_hash;
|
||||
|
||||
/// <summary>Channel ID</summary>
|
||||
|
|
@ -8266,7 +8266,7 @@ namespace TL
|
|||
[TLDef(0x804361EA)]
|
||||
public class PageBlockAudio : PageBlock
|
||||
{
|
||||
/// <summary>Audio ID (to be fetched from the container <see cref="Page"/> constructor</summary>
|
||||
/// <summary>Audio ID (to be fetched from the container <see cref="Page"/></summary>
|
||||
public long audio_id;
|
||||
/// <summary>Audio caption</summary>
|
||||
public PageCaption caption;
|
||||
|
|
@ -12581,7 +12581,7 @@ namespace TL
|
|||
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
|
||||
}
|
||||
|
||||
/// <summary>Information about found messages sent on a specific day, used to split the <c>messages</c> in <see cref="Messages_SearchResultsCalendar"/> constructors by days. <para>See <a href="https://corefork.telegram.org/constructor/searchResultsCalendarPeriod"/></para></summary>
|
||||
/// <summary>Information about found messages sent on a specific day, used to split the <c>messages</c> in <see cref="Messages_SearchResultsCalendar"/>s by days. <para>See <a href="https://corefork.telegram.org/constructor/searchResultsCalendarPeriod"/></para></summary>
|
||||
[TLDef(0xC9B0539F)]
|
||||
public class SearchResultsCalendarPeriod : IObject
|
||||
{
|
||||
|
|
|
|||
|
|
@ -961,7 +961,7 @@ namespace TL
|
|||
});
|
||||
|
||||
/// <summary>Change authorization settings <para>See <a href="https://corefork.telegram.org/method/account.changeAuthorizationSettings"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/account.changeAuthorizationSettings#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="hash">Session ID from the <see cref="Authorization"/> constructor, fetchable using <a href="https://corefork.telegram.org/method/account.getAuthorizations">account.getAuthorizations</a></param>
|
||||
/// <param name="hash">Session ID from the <see cref="Authorization"/>, fetchable using <a href="https://corefork.telegram.org/method/account.getAuthorizations">account.getAuthorizations</a></param>
|
||||
/// <param name="encrypted_requests_disabled">Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed</param>
|
||||
/// <param name="call_requests_disabled">Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed</param>
|
||||
public static Task<bool> Account_ChangeAuthorizationSettings(this Client client, long hash, bool? encrypted_requests_disabled = default, bool? call_requests_disabled = default)
|
||||
|
|
@ -1274,7 +1274,7 @@ namespace TL
|
|||
});
|
||||
|
||||
/// <summary>Gets back found messages <para>See <a href="https://corefork.telegram.org/method/messages.search"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.search#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="peer">User or chat, histories with which are searched, or <see langword="null"/> constructor for global search</param>
|
||||
/// <param name="peer">User or chat, histories with which are searched, or <see langword="null"/> for global search</param>
|
||||
/// <param name="q">Text search request</param>
|
||||
/// <param name="from_id">Only return messages sent by the specified user ID</param>
|
||||
/// <param name="top_msg_id"><a href="https://corefork.telegram.org/api/threads">Thread ID</a></param>
|
||||
|
|
@ -1287,7 +1287,7 @@ namespace TL
|
|||
/// <param name="max_id"><a href="https://corefork.telegram.org/api/offsets">Maximum message ID to return</a></param>
|
||||
/// <param name="min_id"><a href="https://corefork.telegram.org/api/offsets">Minimum message ID to return</a></param>
|
||||
/// <param name="hash"><a href="https://corefork.telegram.org/api/offsets">Hash</a></param>
|
||||
public static Task<Messages_MessagesBase> Messages_Search(this Client client, InputPeer peer, string q, MessagesFilter filter, DateTime min_date = default, DateTime max_date = default, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, long hash = default, InputPeer from_id = null, int? top_msg_id = null)
|
||||
public static Task<Messages_MessagesBase> Messages_Search(this Client client, InputPeer peer, string q, MessagesFilter filter = null, DateTime min_date = default, DateTime max_date = default, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, long hash = default, InputPeer from_id = null, int? top_msg_id = null)
|
||||
=> client.Invoke(new Messages_Search
|
||||
{
|
||||
flags = (Messages_Search.Flags)((from_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x2 : 0)),
|
||||
|
|
@ -1826,7 +1826,7 @@ namespace TL
|
|||
/// <param name="offset_peer"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
|
||||
/// <param name="offset_id"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
|
||||
/// <param name="limit"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
|
||||
public static Task<Messages_MessagesBase> Messages_SearchGlobal(this Client client, string q, MessagesFilter filter, DateTime min_date = default, DateTime max_date = default, int offset_rate = default, InputPeer offset_peer = null, int offset_id = default, int limit = int.MaxValue, int? folder_id = null)
|
||||
public static Task<Messages_MessagesBase> Messages_SearchGlobal(this Client client, string q, MessagesFilter filter = null, DateTime min_date = default, DateTime max_date = default, int offset_rate = default, InputPeer offset_peer = null, int offset_id = default, int limit = int.MaxValue, int? folder_id = null)
|
||||
=> client.Invoke(new Messages_SearchGlobal
|
||||
{
|
||||
flags = (Messages_SearchGlobal.Flags)(folder_id != null ? 0x1 : 0),
|
||||
|
|
@ -2936,7 +2936,7 @@ namespace TL
|
|||
/// <param name="filter">Message filter, <see langword="null"/>, <see cref="InputMessagesFilterMyMentions"/> filters are not supported by this method.</param>
|
||||
/// <param name="offset_id"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
|
||||
/// <param name="offset_date"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
|
||||
public static Task<Messages_SearchResultsCalendar> Messages_GetSearchResultsCalendar(this Client client, InputPeer peer, MessagesFilter filter, int offset_id = default, DateTime offset_date = default)
|
||||
public static Task<Messages_SearchResultsCalendar> Messages_GetSearchResultsCalendar(this Client client, InputPeer peer, MessagesFilter filter = null, int offset_id = default, DateTime offset_date = default)
|
||||
=> client.Invoke(new Messages_GetSearchResultsCalendar
|
||||
{
|
||||
peer = peer,
|
||||
|
|
@ -2950,7 +2950,7 @@ namespace TL
|
|||
/// <param name="filter">Message filter, <see langword="null"/>, <see cref="InputMessagesFilterMyMentions"/> filters are not supported by this method.</param>
|
||||
/// <param name="offset_id"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a></param>
|
||||
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a></param>
|
||||
public static Task<Messages_SearchResultsPositions> Messages_GetSearchResultsPositions(this Client client, InputPeer peer, MessagesFilter filter, int offset_id = default, int limit = int.MaxValue)
|
||||
public static Task<Messages_SearchResultsPositions> Messages_GetSearchResultsPositions(this Client client, InputPeer peer, MessagesFilter filter = null, int offset_id = default, int limit = int.MaxValue)
|
||||
=> client.Invoke(new Messages_GetSearchResultsPositions
|
||||
{
|
||||
peer = peer,
|
||||
|
|
@ -3118,7 +3118,7 @@ namespace TL
|
|||
/// <param name="q">Optional search query</param>
|
||||
/// <param name="filter">Message filter</param>
|
||||
/// <param name="limit">Maximum number of results to return (max 100).</param>
|
||||
public static Task<Messages_MessagesBase> Messages_SearchSentMedia(this Client client, string q, MessagesFilter filter, int limit = int.MaxValue)
|
||||
public static Task<Messages_MessagesBase> Messages_SearchSentMedia(this Client client, string q, MessagesFilter filter = null, int limit = int.MaxValue)
|
||||
=> client.Invoke(new Messages_SearchSentMedia
|
||||
{
|
||||
q = q,
|
||||
|
|
@ -3429,7 +3429,7 @@ namespace TL
|
|||
{
|
||||
});
|
||||
|
||||
/// <summary>Get changelog of current app.<br/>Typically, an <see cref="Updates"/> constructor will be returned, containing one or more <see cref="UpdateServiceNotification"/> updates with app-specific changelogs. <para>See <a href="https://corefork.telegram.org/method/help.getAppChangelog"/></para></summary>
|
||||
/// <summary>Get changelog of current app.<br/>Typically, an <see cref="Updates"/> will be returned, containing one or more <see cref="UpdateServiceNotification"/> updates with app-specific changelogs. <para>See <a href="https://corefork.telegram.org/method/help.getAppChangelog"/></para></summary>
|
||||
/// <param name="prev_app_version">Previous app version</param>
|
||||
public static Task<UpdatesBase> Help_GetAppChangelog(this Client client, string prev_app_version)
|
||||
=> client.Invoke(new Help_GetAppChangelog
|
||||
|
|
@ -4708,7 +4708,7 @@ namespace TL
|
|||
});
|
||||
|
||||
/// <summary>Load <a href="https://corefork.telegram.org/api/stats">channel statistics graph</a> asynchronously <para>See <a href="https://corefork.telegram.org/method/stats.loadAsyncGraph"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/stats.loadAsyncGraph#possible-errors">details</a>)</para></summary>
|
||||
/// <param name="token">Graph token from <see cref="StatsGraphAsync"/> constructor</param>
|
||||
/// <param name="token">Graph token from <see cref="StatsGraphAsync"/></param>
|
||||
/// <param name="x">Zoom value, if required</param>
|
||||
public static Task<StatsGraphBase> Stats_LoadAsyncGraph(this Client client, string token, long? x = null)
|
||||
=> client.Invoke(new Stats_LoadAsyncGraph
|
||||
|
|
|
|||
Loading…
Reference in a new issue