diff --git a/EXAMPLES.md b/EXAMPLES.md
index 1e26e97..c777b70 100644
--- a/EXAMPLES.md
+++ b/EXAMPLES.md
@@ -47,7 +47,7 @@ The `lvl` argument correspond to standard [LogLevel values](https://learn.micros
### Send a message to someone by @username
```csharp
-var resolved = await client.Contacts_ResolveUsername("MyEch0_Bot"); // username without the @
+var resolved = await client.Contacts_ResolveUsername("JsonDumpBot"); // username without the @
await client.SendMessageAsync(resolved, "/start");
```
*Note: This also works if the @username points to a channel/group, but you must already have joined that channel before sending a message to it.
diff --git a/FAQ.md b/FAQ.md
index fcb3789..b703c0b 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -72,13 +72,11 @@ You can then retrieve it with `client.GetAccessHashFor
-#### 5. I need to test a feature that has been developed but not yet released in WTelegramClient nuget
+#### 5. I need to test a feature that has been recently developed but seems not available in my program
-The developmental versions of the library are available through Azure DevOps as part of the Continuous Integration builds after each Github commit.
+The developmental versions of the library are now available as **pre-release** on Nuget (with `-dev` in the version number)
-You can access these versions for testing in your program by going to our [private nuget feeds](https://dev.azure.com/wiz0u/WTelegramClient/_artifacts/feed/WTelegramClient/NuGet/WTelegramClient),
-click on button "Connect to feed" and follow the steps to setup your dev environment.
-After that, you should be able to see/install the pre-release versions in your Nuget package manager and install them in your application. *(make sure you enable the **pre-release** checkbox)*
+So make sure you tick the checkbox "Include prerelease" in Nuget manager and/or navigate to the Versions list then select the highest `x.x.x-dev.x` version to install in your program.
#### 6. Telegram asks me to signup (firstname, lastname) even for an existing account
@@ -307,14 +305,19 @@ So you can either:
- Build your code in RELEASE mode
- Modify your config callback to reply to "server_address" with the IP address of Telegram production servers (as found on your API development tools)
-2) Did you call `LoginUserIfNeeded()`?
-If you don't authenticate as a user (or bot), you have access to a very limited subset of Telegram APIs
+2) Did you call `Login` or `LoginUserIfNeeded` succesfully?
+If you don't complete authentication as a user (or bot), you have access to a very limited subset of Telegram APIs.
+Make sure your calls succeed and don't throw an exception.
3) Did you use `await` with every Client methods?
-This library is completely Task-based. You should learn, understand and use the [asynchronous model of C# programming](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/) before proceeding further.
+This library is completely Task-based. You should learn, understand and use the [asynchronous model of C# programming](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/) before proceeding further.
+Using `.Result` or `.Wait()` can lead to deadlocks.
4) Is your program ending immediately instead of waiting for Updates?
-Your program must be running/waiting continuously in order for the background Task to receive and process the Updates. So make sure your main program doesn't end immediately. For a console program, this is typical done by waiting for a key or some close event.
+Your program must be running/waiting continuously in order for the background Task to receive and process the Updates.
+So make sure your main program doesn't end immediately or dispose the client too soon (via `using`?).
+For a console program, this is typical done by waiting for a key or some close event.
5) Is every Telegram API call rejected? (typically with an exception message like `AUTH_RESTART`)
-The user authentification might have failed at some point (or the user revoked the authorization). It is therefore necessary to go through the authentification again. This can be done by deleting the WTelegram.session file, or at runtime by calling `client.Reset()`
+The user authentification might have failed at some point (or the user revoked the authorization).
+It is therefore necessary to go through the authentification again. This can be done by deleting the WTelegram.session file, or at runtime by calling `client.Reset()`
diff --git a/README.md b/README.md
index d173cc5..1db4148 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,6 @@
[](https://www.nuget.org/packages/WTelegramClient/)
[](https://dev.azure.com/wiz0u/WTelegramClient/_build?definitionId=7)
-[](https://corefork.telegram.org/methods)
-[](https://dev.azure.com/wiz0u/WTelegramClient/_artifacts/feed/WTelegramClient/NuGet/WTelegramClient)
-[](https://t.me/WTelegramClient)
+[](https://corefork.telegram.org/methods)
[](http://t.me/WTelegramBot?start=donate)
## _Telegram Client API library written 100% in C# and .NET Standard_
@@ -204,7 +202,7 @@ It has been tested in a Console app, [in Windows Forms](https://github.com/wiz0u
Don't use this library for Spam or Scam. Respect Telegram [Terms of Service](https://telegram.org/tos)
as well as the [API Terms of Service](https://core.telegram.org/api/terms) or you might get banned from Telegram servers.
-Developers feedback is welcome in the Telegram support group [@WTelegramClient](https://t.me/WTelegramClient)
-You can also check our [📖 Frequently Asked Questions](https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md) for more help and troubleshooting guide.
+If you read all this ReadMe, the [Frequently Asked Questions](https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md),
+the [Examples codes](https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md) and still have questions, feedback is welcome in our Telegram group [@WTelegramClient](https://t.me/WTelegramClient)
If you like this library, please [consider a donation](http://t.me/WTelegramBot?start=donate) ❤ This will help the project keep going.
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 4d66f08..b7fab60 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -2974,7 +2974,7 @@ namespace TL
}
}
/// Channel messages See
- [TLDef(0x64479808)]
+ [TLDef(0xC776BA4E)]
public partial class Messages_ChannelMessages : Messages_MessagesBase, IPeerResolver
{
/// Flags, see TL conditional fields
@@ -2987,6 +2987,7 @@ namespace TL
[IfFlag(2)] public int offset_id_offset;
/// Found messages
public MessageBase[] messages;
+ public ForumTopicBase[] topics;
/// Chats
public Dictionary chats;
/// Users
@@ -4366,16 +4367,29 @@ namespace TL
public MessageExtendedMediaBase extended_media;
}
/// See
- [TLDef(0xF694B0AE)]
+ [TLDef(0x192EFBE3)]
public class UpdateChannelPinnedTopic : Update
{
public Flags flags;
public long channel_id;
- [IfFlag(0)] public int topic_id;
+ public int topic_id;
[Flags] public enum Flags : uint
{
- has_topic_id = 0x1,
+ pinned = 0x1,
+ }
+ }
+ /// See
+ [TLDef(0xFE198602)]
+ public class UpdateChannelPinnedTopics : Update
+ {
+ public Flags flags;
+ public long channel_id;
+ [IfFlag(0)] public int[] order;
+
+ [Flags] public enum Flags : uint
+ {
+ has_order = 0x1,
}
}
@@ -13857,6 +13871,7 @@ namespace TL
closed = 0x4,
pinned = 0x8,
has_draft = 0x10,
+ short = 0x20,
}
public override int ID => id;
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 5eb402f..b2d4701 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -4296,6 +4296,15 @@ namespace TL
top_msg_id = top_msg_id,
});
+ /// See
+ public static Task Channels_ReorderPinnedForumTopics(this Client client, InputChannelBase channel, int[] order, bool force = false)
+ => client.Invoke(new Channels_ReorderPinnedForumTopics
+ {
+ flags = (Channels_ReorderPinnedForumTopics.Flags)(force ? 0x1 : 0),
+ channel = channel,
+ order = order,
+ });
+
/// Sends a custom request; for bots only See [bots: ✓] Possible codes: 400,403 (details)
/// The method name
/// JSON-serialized method parameters
@@ -8529,6 +8538,19 @@ namespace TL.Methods
public int top_msg_id;
}
+ [TLDef(0x2950A18F)]
+ public class Channels_ReorderPinnedForumTopics : IMethod
+ {
+ public Flags flags;
+ public InputChannelBase channel;
+ public int[] order;
+
+ [Flags] public enum Flags : uint
+ {
+ force = 0x1,
+ }
+ }
+
[TLDef(0xAA2769ED)]
public class Bots_SendCustomRequest : IMethod
{
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index 50a3c11..d991db7 100644
--- a/src/TL.Table.cs
+++ b/src/TL.Table.cs
@@ -6,7 +6,7 @@ namespace TL
{
public static class Layer
{
- public const int Version = 148; // fetched 01/11/2022 17:33:23
+ public const int Version = 149; // fetched 23/11/2022 13:15:45
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -233,7 +233,7 @@ namespace TL
[0xF0E3E596] = typeof(Messages_DialogsNotModified),
[0x8C718E87] = typeof(Messages_Messages),
[0x3A54685E] = typeof(Messages_MessagesSlice),
- [0x64479808] = typeof(Messages_ChannelMessages),
+ [0xC776BA4E] = typeof(Messages_ChannelMessages),
[0x74535F21] = typeof(Messages_MessagesNotModified),
[0x64FF9FD5] = typeof(Messages_Chats),
[0x9CD81144] = typeof(Messages_ChatsSlice),
@@ -363,7 +363,8 @@ namespace TL
[0x6F7863F4] = typeof(UpdateRecentReactions),
[0x86FCCF85] = typeof(UpdateMoveStickerSetToTop),
[0x5A73A98C] = typeof(UpdateMessageExtendedMedia),
- [0xF694B0AE] = typeof(UpdateChannelPinnedTopic),
+ [0x192EFBE3] = typeof(UpdateChannelPinnedTopic),
+ [0xFE198602] = typeof(UpdateChannelPinnedTopics),
[0xA56C2A3E] = typeof(Updates_State),
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
[0x00F49CA0] = typeof(Updates_Difference),