No need to escape MarkdownV2 chars in code sections

This commit is contained in:
Wizou 2024-07-12 14:34:30 +02:00
parent 7643ed5ba4
commit 4946322045
5 changed files with 13 additions and 8 deletions

2
.github/dev.yml vendored
View file

@ -1,7 +1,7 @@
pr: none
trigger: [ master ]
name: 4.1.4-dev.$(Rev:r)
name: 4.1.5-dev.$(Rev:r)
pool:
vmImage: ubuntu-latest

6
FAQ.md
View file

@ -59,8 +59,9 @@ 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).
<ins>However</ins> 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.
The `access_hash` must usually be provided within the `Input...` structure you pass in argument to an API method (`InputPeer`, `InputChannel`, `InputUser`, etc...).
@ -108,7 +109,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.
> For FLOOD_WAIT_X with X < 60 seconds (see `client.FloodRetryThreshold`), WTelegramClient will automatically wait the specified delay and retry the request for you.
> [!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 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.

View file

@ -10,7 +10,8 @@ All the Telegram Client APIs (MTProto) are supported so you can do everything th
This ReadMe is a **quick but important tutorial** to learn the fundamentals about this library. Please read it all.
>⚠️ This library requires understanding advanced C# techniques such as **asynchronous programming** or **subclass pattern matching**...
> [!IMPORTANT]
> This library requires understanding advanced C# techniques such as **asynchronous programming** or **subclass pattern matching**...
> If you are a beginner in C#, starting a project based on this library might not be a great idea.
# How to use
@ -114,7 +115,8 @@ See [WinForms example](https://wiz0u.github.io/WTelegramClient/Examples/WinForms
# Example of API call
> The Telegram API makes extensive usage of base and derived classes, so be ready to use the various C# syntaxes
> [!NOTE]
> The Telegram API makes extensive usage of base and derived classes, so be ready to use the various C# syntaxes
to check/cast base classes into the more useful derived classes (`is`, `as`, `case DerivedType` )
All the Telegram API classes/methods are fully documented through Intellisense: Place your mouse over a class/method name,

View file

@ -297,6 +297,7 @@ namespace TL
{
case '_': case '*': case '~': case '`': case '#': case '+': case '-': case '=': case '.': case '!':
case '[': case ']': case '(': case ')': case '{': case '}': case '>': case '|': case '\\':
if (closings.Count == 0 || closings[0].md[0] != '`')
sb.Insert(i++, '\\');
break;
}

View file

@ -9,7 +9,7 @@ using TL;
namespace WTelegram
{
public class UpdateManager : IPeerResolver
public class UpdateManager
{
/// <summary>Collected info about Users <i>(only if using the default collector)</i></summary>
public readonly Dictionary<long, User> Users;