From cbcb11e25e8b083c66909c1d0569ad8b8e10f608 Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Thu, 2 Jan 2025 14:25:35 +0100
Subject: [PATCH] API Layer 196.2: Bots_SetCustomVerification,
GetBotRecommendations, Messages_ReportMessagesDelivery, ...
---
.github/dev.yml | 3 +-
src/TL.Schema.cs | 13 ++++++++
src/TL.SchemaFuncs.cs | 75 +++++++++++++++++++++++++++++++++++++++++--
src/TL.Table.cs | 4 ++-
4 files changed, 91 insertions(+), 4 deletions(-)
diff --git a/.github/dev.yml b/.github/dev.yml
index ef0d405..97a9eb5 100644
--- a/.github/dev.yml
+++ b/.github/dev.yml
@@ -1,7 +1,7 @@
pr: none
trigger: [ master ]
-name: 4.2.6-dev.$(Rev:r)
+name: 4.2.7-dev.$(Rev:r)
pool:
vmImage: ubuntu-latest
@@ -57,3 +57,4 @@ stages:
"message": "{ \"commitId\": \"$(Build.SourceVersion)\", \"buildNumber\": \"$(Build.BuildNumber)\", \"teamProjectName\": \"$(System.TeamProject)\", \"commitMessage\": \"$(Release_Notes)\" }"
}
waitForCompletion: 'false'
+
\ No newline at end of file
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 60b1d51..8b721da 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -20153,4 +20153,17 @@ namespace TL
{
public StarGiftAttribute[] sample_attributes;
}
+
+ /// See
+ [TLDef(0x62D706B8)]
+ public partial class Users_Users : IObject
+ {
+ public Dictionary users;
+ }
+ /// See
+ [TLDef(0x315A4974)]
+ public sealed partial class Users_UsersSlice : Users_Users
+ {
+ public int count;
+ }
}
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index ad52cc5..1bad50b 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -2323,6 +2323,8 @@ namespace TL
/// Search for messages and peers globally See Possible codes: 400 (details)
/// If set, only returns results from channels (used in the global channel search tab »).
+ /// Whether to search only in groups
+ /// Whether to search only in private chats
/// Peer folder ID, for more info click here
/// Query
/// Global search filter
@@ -2332,10 +2334,10 @@ namespace TL
/// Offsets for pagination, for more info click here
/// Offsets for pagination, for more info click here
/// Offsets for pagination, for more info click here
- public static Task 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, bool broadcasts_only = false)
+ public static Task 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, bool broadcasts_only = false, bool groups_only = false, bool users_only = false)
=> client.Invoke(new Messages_SearchGlobal
{
- flags = (Messages_SearchGlobal.Flags)((folder_id != null ? 0x1 : 0) | (broadcasts_only ? 0x2 : 0)),
+ flags = (Messages_SearchGlobal.Flags)((folder_id != null ? 0x1 : 0) | (broadcasts_only ? 0x2 : 0) | (groups_only ? 0x4 : 0) | (users_only ? 0x8 : 0)),
folder_id = folder_id ?? default,
q = q,
filter = filter,
@@ -4448,6 +4450,15 @@ namespace TL
hash = hash,
});
+ /// See
+ public static Task Messages_ReportMessagesDelivery(this Client client, InputPeer peer, int[] id, bool push = false)
+ => client.Invoke(new Messages_ReportMessagesDelivery
+ {
+ flags = (Messages_ReportMessagesDelivery.Flags)(push ? 0x1 : 0),
+ peer = peer,
+ id = id,
+ });
+
/// Returns a current state of updates. See [bots: ✓]
public static Task Updates_GetState(this Client client)
=> client.Invoke(new Updates_GetState
@@ -5824,6 +5835,24 @@ namespace TL
duration_months = duration_months ?? default,
});
+ /// See
+ public static Task Bots_SetCustomVerification(this Client client, InputPeer peer, InputUserBase bot = null, string custom_description = null, bool enabled = false)
+ => client.Invoke(new Bots_SetCustomVerification
+ {
+ flags = (Bots_SetCustomVerification.Flags)((bot != null ? 0x1 : 0) | (custom_description != null ? 0x4 : 0) | (enabled ? 0x2 : 0)),
+ bot = bot,
+ peer = peer,
+ custom_description = custom_description,
+ });
+
+ /// See
+ public static Task Bots_GetBotRecommendations(this Client client, InputUserBase bot)
+ => client.Invoke(new Bots_GetBotRecommendations
+ {
+ flags = 0,
+ bot = bot,
+ });
+
/// Get a payment form See Possible codes: 400 (details)
/// Invoice
/// Theme parameters »
@@ -9364,6 +9393,8 @@ namespace TL.Methods
{
has_folder_id = 0x1,
broadcasts_only = 0x2,
+ groups_only = 0x4,
+ users_only = 0x8,
}
}
@@ -11167,6 +11198,19 @@ namespace TL.Methods
}
}
+ [TLDef(0x5A6D7395)]
+ public sealed partial class Messages_ReportMessagesDelivery : IMethod
+ {
+ public Flags flags;
+ public InputPeer peer;
+ public int[] id;
+
+ [Flags] public enum Flags : uint
+ {
+ push = 0x1,
+ }
+ }
+
[TLDef(0xEDD4882A)]
public sealed partial class Updates_GetState : IMethod { }
@@ -12222,6 +12266,33 @@ namespace TL.Methods
}
}
+ [TLDef(0x8B89DFBD)]
+ public sealed partial class Bots_SetCustomVerification : IMethod
+ {
+ public Flags flags;
+ [IfFlag(0)] public InputUserBase bot;
+ public InputPeer peer;
+ [IfFlag(2)] public string custom_description;
+
+ [Flags] public enum Flags : uint
+ {
+ has_bot = 0x1,
+ enabled = 0x2,
+ has_custom_description = 0x4,
+ }
+ }
+
+ [TLDef(0x2855BE61)]
+ public sealed partial class Bots_GetBotRecommendations : IMethod
+ {
+ public Flags flags;
+ public InputUserBase bot;
+
+ [Flags] public enum Flags : uint
+ {
+ }
+ }
+
[TLDef(0x37148DBB)]
public sealed partial class Payments_GetPaymentForm : IMethod
{
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index a818019..9ff74e4 100644
--- a/src/TL.Table.cs
+++ b/src/TL.Table.cs
@@ -6,7 +6,7 @@ namespace TL
{
public static partial class Layer
{
- public const int Version = 196; // fetched 01/01/2025 23:32:39
+ public const int Version = 196; // fetched 02/01/2025 13:18:52
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -1367,6 +1367,8 @@ namespace TL
[0x94271762] = typeof(StarGiftAttributeBackdrop),
[0xC02C4F4B] = typeof(StarGiftAttributeOriginalDetails),
[0x167BD90B] = typeof(Payments_StarGiftUpgradePreview),
+ [0x62D706B8] = typeof(Users_Users),
+ [0x315A4974] = typeof(Users_UsersSlice),
// from TL.Secret:
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),