mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
Compare commits
11 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfc8e0e1b5 | ||
|
|
e923d65d53 | ||
|
|
4ad2f0a212 | ||
|
|
30bc536ebc | ||
|
|
d6fdcab440 | ||
|
|
9ec2f31f72 | ||
|
|
4ccfddd22e | ||
|
|
9693037ef2 | ||
|
|
40bcf69bfb | ||
|
|
4875f75774 | ||
|
|
2e95576be5 |
31
.github/workflows/dev.yml
vendored
31
.github/workflows/dev.yml
vendored
|
|
@ -12,14 +12,16 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
permissions:
|
||||||
|
id-token: write # enable GitHub OIDC token issuance for this job
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 100
|
fetch-depth: 30
|
||||||
- name: Determine version
|
- name: Determine version
|
||||||
run: |
|
run: |
|
||||||
git fetch --depth=100 --tags
|
git fetch --depth=30 --tags
|
||||||
DESCR_TAG=$(git describe --tags)
|
DESCR_TAG=$(git describe --tags)
|
||||||
COMMITS=${DESCR_TAG#*-}
|
COMMITS=${DESCR_TAG#*-}
|
||||||
COMMITS=${COMMITS%-*}
|
COMMITS=${COMMITS%-*}
|
||||||
|
|
@ -29,19 +31,32 @@ jobs:
|
||||||
if [[ "$RELEASE_VERSION" > "$NEXT_VERSION" ]] then VERSION=$RELEASE_VERSION; else VERSION=$NEXT_VERSION; fi
|
if [[ "$RELEASE_VERSION" > "$NEXT_VERSION" ]] then VERSION=$RELEASE_VERSION; else VERSION=$NEXT_VERSION; fi
|
||||||
echo Last tag: $LAST_TAG · Next version: $NEXT_VERSION · Release version: $RELEASE_VERSION · Build version: $VERSION
|
echo Last tag: $LAST_TAG · Next version: $NEXT_VERSION · Release version: $RELEASE_VERSION · Build version: $VERSION
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
- name: Setup .NET
|
|
||||||
uses: actions/setup-dotnet@v4
|
# - name: Setup .NET
|
||||||
with:
|
# uses: actions/setup-dotnet@v4
|
||||||
dotnet-version: 8.0.x
|
# with:
|
||||||
|
# dotnet-version: 8.0.x
|
||||||
- name: Pack
|
- name: Pack
|
||||||
run: dotnet pack $PROJECT_PATH --configuration $CONFIGURATION -p:Version=$VERSION "-p:ReleaseNotes=\"$RELEASE_NOTES\"" --output packages
|
run: |
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES//$'\n'/%0A}
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES//\"/%22}
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES//,/%2C}
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES//;/%3B}
|
||||||
|
dotnet pack $PROJECT_PATH --configuration $CONFIGURATION -p:Version=$VERSION -p:ReleaseNotes="$RELEASE_NOTES" --output packages
|
||||||
# - name: Upload artifact
|
# - name: Upload artifact
|
||||||
# uses: actions/upload-artifact@v4
|
# uses: actions/upload-artifact@v4
|
||||||
# with:
|
# with:
|
||||||
# name: packages
|
# name: packages
|
||||||
# path: packages/*.nupkg
|
# path: packages/*.nupkg
|
||||||
|
|
||||||
|
- name: NuGet login (OIDC → temp API key)
|
||||||
|
uses: NuGet/login@v1
|
||||||
|
id: login
|
||||||
|
with:
|
||||||
|
user: ${{ secrets.NUGET_USER }}
|
||||||
- name: Nuget push
|
- name: Nuget push
|
||||||
run: dotnet nuget push packages/*.nupkg --api-key ${{secrets.NUGETAPIKEY}} --skip-duplicate --source https://api.nuget.org/v3/index.json
|
run: dotnet nuget push packages/*.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --skip-duplicate --source https://api.nuget.org/v3/index.json
|
||||||
|
|
||||||
- name: Deployment Notification
|
- name: Deployment Notification
|
||||||
env:
|
env:
|
||||||
JSON: |
|
JSON: |
|
||||||
|
|
|
||||||
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
|
|
@ -21,7 +21,8 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # For git tag
|
contents: write # For git tag
|
||||||
|
id-token: write # enable GitHub OIDC token issuance for this job
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -37,19 +38,35 @@ jobs:
|
||||||
if [[ "$RELEASE_VERSION" > "$NEXT_VERSION" ]] then VERSION=$RELEASE_VERSION; else VERSION=$NEXT_VERSION; fi
|
if [[ "$RELEASE_VERSION" > "$NEXT_VERSION" ]] then VERSION=$RELEASE_VERSION; else VERSION=$NEXT_VERSION; fi
|
||||||
echo Last tag: $LAST_TAG · Next version: $NEXT_VERSION · Release version: $RELEASE_VERSION · Build version: $VERSION
|
echo Last tag: $LAST_TAG · Next version: $NEXT_VERSION · Release version: $RELEASE_VERSION · Build version: $VERSION
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x
|
dotnet-version: 8.0.x
|
||||||
- name: Pack
|
- name: Pack
|
||||||
run: dotnet pack $PROJECT_PATH --configuration $CONFIGURATION -p:Version=$VERSION "-p:ReleaseNotes=\"$RELEASE_NOTES\"" --output packages
|
run: |
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES//|/%0A}
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES// - /%0A- }
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES// /%0A%0A}
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES//$'\n'/%0A}
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES//\"/%22}
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES//,/%2C}
|
||||||
|
RELEASE_NOTES=${RELEASE_NOTES//;/%3B}
|
||||||
|
dotnet pack $PROJECT_PATH --configuration $CONFIGURATION -p:Version=$VERSION -p:ReleaseNotes="$RELEASE_NOTES" --output packages
|
||||||
# - name: Upload artifact
|
# - name: Upload artifact
|
||||||
# uses: actions/upload-artifact@v4
|
# uses: actions/upload-artifact@v4
|
||||||
# with:
|
# with:
|
||||||
# name: packages
|
# name: packages
|
||||||
# path: packages/*.nupkg
|
# path: packages/*.nupkg
|
||||||
|
|
||||||
|
- name: NuGet login (OIDC → temp API key)
|
||||||
|
uses: NuGet/login@v1
|
||||||
|
id: login
|
||||||
|
with:
|
||||||
|
user: ${{ secrets.NUGET_USER }}
|
||||||
- name: Nuget push
|
- name: Nuget push
|
||||||
run: dotnet nuget push packages/*.nupkg --api-key ${{secrets.NUGETAPIKEY}} --skip-duplicate --source https://api.nuget.org/v3/index.json
|
run: dotnet nuget push packages/*.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --skip-duplicate --source https://api.nuget.org/v3/index.json
|
||||||
|
|
||||||
- name: Git tag
|
- name: Git tag
|
||||||
run: |
|
run: |
|
||||||
git tag $VERSION
|
git tag $VERSION
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[](https://corefork.telegram.org/methods)
|
[](https://corefork.telegram.org/methods)
|
||||||
[](https://www.nuget.org/packages/WTelegramClient/)
|
[](https://www.nuget.org/packages/WTelegramClient/)
|
||||||
[](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
|
[](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
|
||||||
[](https://buymeacoffee.com/wizou)
|
[](https://buymeacoffee.com/wizou)
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ public class MTProtoGenerator : IIncrementalGenerator
|
||||||
ns = symbol.ContainingNamespace.ToString();
|
ns = symbol.ContainingNamespace.ToString();
|
||||||
name = symbol.Name;
|
name = symbol.Name;
|
||||||
if (!namespaces.TryGetValue(ns, out var classes)) namespaces[ns] = classes = [];
|
if (!namespaces.TryGetValue(ns, out var classes)) namespaces[ns] = classes = [];
|
||||||
if (name is "_Message" or "RpcResult" or "MsgCopy")
|
if (name is "_Message" or "MsgCopy")
|
||||||
{
|
{
|
||||||
classes[name] = "\t\tpublic void WriteTL(BinaryWriter writer) => throw new NotSupportedException();";
|
classes[name] = "\t\tpublic void WriteTL(BinaryWriter writer) => throw new NotSupportedException();";
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -93,7 +93,7 @@ public class MTProtoGenerator : IIncrementalGenerator
|
||||||
else if (name != "Null")
|
else if (name != "Null")
|
||||||
{
|
{
|
||||||
if (ns == "TL.Methods")
|
if (ns == "TL.Methods")
|
||||||
methodsTL.AppendLine($"\t\t\t[0x{id:X8}] = {(ns == "TL" ? "" : ns + '.')}{name}{(symbol.IsGenericType ? "<IObject>" : "")}.ReadTL,");
|
methodsTL.AppendLine($"\t\t\t[0x{id:X8}] = {(ns == "TL" ? "" : ns + '.')}{name}{(symbol.IsGenericType ? "<object>" : "")}.ReadTL,");
|
||||||
if (ns != "TL.Methods" || name == "Ping")
|
if (ns != "TL.Methods" || name == "Ping")
|
||||||
tableTL.AppendLine($"\t\t\t[0x{id:X8}] = {(ns == "TL" ? "" : ns + '.')}{name}.ReadTL,");
|
tableTL.AppendLine($"\t\t\t[0x{id:X8}] = {(ns == "TL" ? "" : ns + '.')}{name}.ReadTL,");
|
||||||
}
|
}
|
||||||
|
|
@ -176,25 +176,34 @@ public class MTProtoGenerator : IIncrementalGenerator
|
||||||
writeTl.AppendLine($"writer.WriteTLMessages({member.Name});");
|
writeTl.AppendLine($"writer.WriteTLMessages({member.Name});");
|
||||||
break;
|
break;
|
||||||
case "TL.IObject": case "TL.IMethod<X>":
|
case "TL.IObject": case "TL.IMethod<X>":
|
||||||
readTL.AppendLine($"r.{member.Name} = {(memberType == "TL.IObject" ? "" : $"({memberType})")}reader.ReadTLObject();");
|
readTL.AppendLine($"r.{member.Name} = {(memberType == "TL.IObject" ? "reader.ReadTLObject()" : "reader.ReadTLMethod<X>()")};");
|
||||||
writeTl.AppendLine($"{member.Name}.WriteTL(writer);");
|
writeTl.AppendLine($"{member.Name}.WriteTL(writer);");
|
||||||
break;
|
break;
|
||||||
case "System.Collections.Generic.Dictionary<long, TL.User>":
|
case "System.Collections.Generic.Dictionary<long, TL.User>":
|
||||||
readTL.AppendLine($"r.{member.Name} = reader.ReadTLDictionary<User>();");
|
readTL.AppendLine($"r.{member.Name} = reader.ReadTLDictionary<User>();");
|
||||||
writeTl.AppendLine($"writer.WriteTLVector({member.Name}.Values.ToArray());");
|
writeTl.AppendLine($"writer.WriteTLVector({member.Name}?.Values.ToArray());");
|
||||||
break;
|
break;
|
||||||
case "System.Collections.Generic.Dictionary<long, TL.ChatBase>":
|
case "System.Collections.Generic.Dictionary<long, TL.ChatBase>":
|
||||||
readTL.AppendLine($"r.{member.Name} = reader.ReadTLDictionary<ChatBase>();");
|
readTL.AppendLine($"r.{member.Name} = reader.ReadTLDictionary<ChatBase>();");
|
||||||
writeTl.AppendLine($"writer.WriteTLVector({member.Name}.Values.ToArray());");
|
writeTl.AppendLine($"writer.WriteTLVector({member.Name}?.Values.ToArray());");
|
||||||
|
break;
|
||||||
|
case "object":
|
||||||
|
readTL.AppendLine($"r.{member.Name} = reader.ReadTLObject();");
|
||||||
|
writeTl.AppendLine($"writer.WriteTLValue({member.Name}, {member.Name}.GetType());");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (member.Type is IArrayTypeSymbol arrayType)
|
if (member.Type is IArrayTypeSymbol arrayType)
|
||||||
{
|
{
|
||||||
if (name is "FutureSalts")
|
if (name is "FutureSalts")
|
||||||
|
{
|
||||||
readTL.AppendLine($"r.{member.Name} = reader.ReadTLRawVector<{memberType.Substring(0, memberType.Length - 2)}>(0x0949D9DC).ToArray();");
|
readTL.AppendLine($"r.{member.Name} = reader.ReadTLRawVector<{memberType.Substring(0, memberType.Length - 2)}>(0x0949D9DC).ToArray();");
|
||||||
|
writeTl.AppendLine($"writer.WriteTLRawVector({member.Name}, 16);");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
readTL.AppendLine($"r.{member.Name} = reader.ReadTLVector<{memberType.Substring(0, memberType.Length - 2)}>();");
|
readTL.AppendLine($"r.{member.Name} = reader.ReadTLVector<{memberType.Substring(0, memberType.Length - 2)}>();");
|
||||||
writeTl.AppendLine($"writer.WriteTLVector({member.Name});");
|
writeTl.AppendLine($"writer.WriteTLVector({member.Name});");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (member.Type.BaseType.SpecialType == SpecialType.System_Enum)
|
else if (member.Type.BaseType.SpecialType == SpecialType.System_Enum)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -361,6 +361,18 @@ namespace WTelegram
|
||||||
return thumbSize == null ? document.mime_type : "image/" + fileType;
|
return thumbSize == null ? document.mime_type : "image/" + fileType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Download a document from Telegram into the outputStream</summary>
|
||||||
|
/// <param name="document">The document to download</param>
|
||||||
|
/// <param name="outputStream">Stream to write the file content to. This method does not close/dispose the stream</param>
|
||||||
|
/// <param name="videoSize">A specific size/version of the animated photo. Use <c>photo.LargestVideoSize</c> to download the largest version of the animated photo</param>
|
||||||
|
/// <param name="progress">(optional) Callback for tracking the progression of the transfer</param>
|
||||||
|
/// <returns>MIME type of the document/thumbnail</returns>
|
||||||
|
public async Task<Storage_FileType> DownloadFileAsync(Document document, Stream outputStream, VideoSize videoSize, ProgressCallback progress = null)
|
||||||
|
{
|
||||||
|
var fileLocation = document.ToFileLocation(videoSize);
|
||||||
|
return await DownloadFileAsync(fileLocation, outputStream, document.dc_id, videoSize.size, progress);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Download a file from Telegram into the outputStream</summary>
|
/// <summary>Download a file from Telegram into the outputStream</summary>
|
||||||
/// <param name="fileLocation">Telegram file identifier, typically obtained with a .ToFileLocation() call</param>
|
/// <param name="fileLocation">Telegram file identifier, typically obtained with a .ToFileLocation() call</param>
|
||||||
/// <param name="outputStream">Stream to write file content to. This method does not close/dispose the stream</param>
|
/// <param name="outputStream">Stream to write file content to. This method does not close/dispose the stream</param>
|
||||||
|
|
@ -640,18 +652,18 @@ namespace WTelegram
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Helper simplified method: Get all <a href="https://corefork.telegram.org/api/forum">topics of a forum</a> <para>See <a href="https://corefork.telegram.org/method/channels.getForumTopics"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.getForumTopics#possible-errors">details</a>)</para></summary>
|
/// <summary>Helper simplified method: Get all <a href="https://corefork.telegram.org/api/forum">topics of a forum</a> <para>See <a href="https://corefork.telegram.org/method/channels.getForumTopics"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.getForumTopics#possible-errors">details</a>)</para></summary>
|
||||||
/// <param name="channel">Supergroup</param>
|
/// <param name="peer">Supergroup or Bot peer</param>
|
||||||
/// <param name="q">Search query</param>
|
/// <param name="q">Search query</param>
|
||||||
public async Task<Messages_ForumTopics> Channels_GetAllForumTopics(InputChannelBase channel, string q = null)
|
public async Task<Messages_ForumTopics> Channels_GetAllForumTopics(InputPeer peer, string q = null)
|
||||||
{
|
{
|
||||||
var result = await this.Channels_GetForumTopics(channel, offset_date: DateTime.MaxValue, q: q);
|
var result = await this.Messages_GetForumTopics(peer, offset_date: DateTime.MaxValue, q: q);
|
||||||
if (result.topics.Length < result.count)
|
if (result.topics.Length < result.count)
|
||||||
{
|
{
|
||||||
var topics = result.topics.ToList();
|
var topics = result.topics.ToList();
|
||||||
var messages = result.messages.ToList();
|
var messages = result.messages.ToList();
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
var more_topics = await this.Channels_GetForumTopics(channel, messages[^1].Date, messages[^1].ID, topics[^1].ID);
|
var more_topics = await this.Messages_GetForumTopics(peer, messages[^1].Date, messages[^1].ID, topics[^1].ID);
|
||||||
if (more_topics.topics.Length == 0) break;
|
if (more_topics.topics.Length == 0) break;
|
||||||
topics.AddRange(more_topics.topics);
|
topics.AddRange(more_topics.topics);
|
||||||
messages.AddRange(more_topics.messages);
|
messages.AddRange(more_topics.messages);
|
||||||
|
|
|
||||||
|
|
@ -589,7 +589,7 @@ namespace WTelegram
|
||||||
{
|
{
|
||||||
var msg = new _Message(reader.ReadInt64(), reader.ReadInt32(), null) { bytes = reader.ReadInt32() };
|
var msg = new _Message(reader.ReadInt64(), reader.ReadInt32(), null) { bytes = reader.ReadInt32() };
|
||||||
messages.Add(msg);
|
messages.Add(msg);
|
||||||
if ((msg.seq_no & 1) != 0) lock (_msgsToAck) _msgsToAck.Add(msg.msg_id);
|
if ((msg.seqno & 1) != 0) lock (_msgsToAck) _msgsToAck.Add(msg.msg_id);
|
||||||
var pos = reader.BaseStream.Position;
|
var pos = reader.BaseStream.Position;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -602,7 +602,7 @@ namespace WTelegram
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var obj = msg.body = reader.ReadTLObject(ctorNb);
|
var obj = msg.body = reader.ReadTLObject(ctorNb);
|
||||||
Helpers.Log(1, $" → {obj.GetType().Name,-38} {MsgIdToStamp(msg.msg_id):u} {((msg.seq_no & 1) != 0 ? "" : "(svc)")} {((msg.msg_id & 2) == 0 ? "" : "NAR")}");
|
Helpers.Log(1, $" → {obj.GetType().Name,-38} {MsgIdToStamp(msg.msg_id):u} {((msg.seqno & 1) != 0 ? "" : "(svc)")} {((msg.msg_id & 2) == 0 ? "" : "NAR")}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -1125,7 +1125,7 @@ namespace WTelegram
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var users = await this.Users_GetUsers(InputUser.Self); // this calls also reenable incoming Updates
|
var users = await this.Users_GetUsers(InputUser.Self); // this call also reenable incoming Updates
|
||||||
var self = users[0] as User;
|
var self = users[0] as User;
|
||||||
if (self.id == long.Parse(botToken.Split(':')[0]))
|
if (self.id == long.Parse(botToken.Split(':')[0]))
|
||||||
{
|
{
|
||||||
|
|
@ -1477,7 +1477,7 @@ namespace WTelegram
|
||||||
writer.Write(0L); // int64 auth_key_id = 0 (Unencrypted)
|
writer.Write(0L); // int64 auth_key_id = 0 (Unencrypted)
|
||||||
writer.Write(msgId); // int64 message_id
|
writer.Write(msgId); // int64 message_id
|
||||||
writer.Write(0); // int32 message_data_length (to be patched)
|
writer.Write(0); // int32 message_data_length (to be patched)
|
||||||
Helpers.Log(1, $"{_dcSession.DcID}>Sending {msg.GetType().Name.TrimEnd('_')}...");
|
Helpers.Log(1, $"{_dcSession.DcID}>Sending {msg.GetType().Name.TrimEnd('_')}");
|
||||||
writer.WriteTLObject(msg); // bytes message_data
|
writer.WriteTLObject(msg); // bytes message_data
|
||||||
BinaryPrimitives.WriteInt32LittleEndian(memStream.GetBuffer().AsSpan(20), (int)memStream.Length - 24); // patch message_data_length
|
BinaryPrimitives.WriteInt32LittleEndian(memStream.GetBuffer().AsSpan(20), (int)memStream.Length - 24); // patch message_data_length
|
||||||
}
|
}
|
||||||
|
|
@ -1629,7 +1629,7 @@ namespace WTelegram
|
||||||
got503 = true;
|
got503 = true;
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
else if (code == 401 && message == "SESSION_REVOKED" && !IsMainDC) // need to renegociate alt-DC auth
|
else if (code == 401 && !IsMainDC && message is "SESSION_REVOKED" or "AUTH_KEY_UNREGISTERED") // need to renegociate alt-DC auth
|
||||||
{
|
{
|
||||||
lock (_session)
|
lock (_session)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ namespace WTelegram
|
||||||
if (serverDHparams is not ServerDHParamsOk serverDHparamsOk) throw new WTException("not server_DH_params_ok");
|
if (serverDHparams is not ServerDHParamsOk serverDHparamsOk) throw new WTException("not server_DH_params_ok");
|
||||||
if (serverDHparamsOk.nonce != nonce) throw new WTException("Nonce mismatch");
|
if (serverDHparamsOk.nonce != nonce) throw new WTException("Nonce mismatch");
|
||||||
if (serverDHparamsOk.server_nonce != resPQ.server_nonce) throw new WTException("Server Nonce mismatch");
|
if (serverDHparamsOk.server_nonce != resPQ.server_nonce) throw new WTException("Server Nonce mismatch");
|
||||||
var (tmp_aes_key, tmp_aes_iv) = ConstructTmpAESKeyIV(resPQ.server_nonce, pqInnerData.new_nonce);
|
var (tmp_aes_key, tmp_aes_iv) = ConstructTmpAESKeyIV(sha1, resPQ.server_nonce, pqInnerData.new_nonce);
|
||||||
var answer = AES_IGE_EncryptDecrypt(serverDHparamsOk.encrypted_answer, tmp_aes_key, tmp_aes_iv, false);
|
var answer = AES_IGE_EncryptDecrypt(serverDHparamsOk.encrypted_answer, tmp_aes_key, tmp_aes_iv, false);
|
||||||
|
|
||||||
using var answerReader = new BinaryReader(new MemoryStream(answer));
|
using var answerReader = new BinaryReader(new MemoryStream(answer));
|
||||||
|
|
@ -163,26 +163,26 @@ namespace WTelegram
|
||||||
session.AuthKey = authKey;
|
session.AuthKey = authKey;
|
||||||
session.Salt = BinaryPrimitives.ReadInt64LittleEndian(pqInnerData.new_nonce.raw) ^ BinaryPrimitives.ReadInt64LittleEndian(resPQ.server_nonce.raw);
|
session.Salt = BinaryPrimitives.ReadInt64LittleEndian(pqInnerData.new_nonce.raw) ^ BinaryPrimitives.ReadInt64LittleEndian(resPQ.server_nonce.raw);
|
||||||
session.OldSalt = session.Salt;
|
session.OldSalt = session.Salt;
|
||||||
|
}
|
||||||
|
|
||||||
(byte[] key, byte[] iv) ConstructTmpAESKeyIV(TL.Int128 server_nonce, Int256 new_nonce)
|
public static (byte[] key, byte[] iv) ConstructTmpAESKeyIV(SHA1 sha1, TL.Int128 server_nonce, Int256 new_nonce)
|
||||||
{
|
{
|
||||||
byte[] tmp_aes_key = new byte[32], tmp_aes_iv = new byte[32];
|
byte[] tmp_aes_key = new byte[32], tmp_aes_iv = new byte[32];
|
||||||
sha1.TransformBlock(new_nonce, 0, 32, null, 0);
|
sha1.TransformBlock(new_nonce, 0, 32, null, 0);
|
||||||
sha1.TransformFinalBlock(server_nonce, 0, 16);
|
sha1.TransformFinalBlock(server_nonce, 0, 16);
|
||||||
sha1.Hash.CopyTo(tmp_aes_key, 0); // tmp_aes_key := SHA1(new_nonce + server_nonce)
|
sha1.Hash.CopyTo(tmp_aes_key, 0); // tmp_aes_key := SHA1(new_nonce + server_nonce)
|
||||||
sha1.Initialize();
|
sha1.Initialize();
|
||||||
sha1.TransformBlock(server_nonce, 0, 16, null, 0);
|
sha1.TransformBlock(server_nonce, 0, 16, null, 0);
|
||||||
sha1.TransformFinalBlock(new_nonce, 0, 32);
|
sha1.TransformFinalBlock(new_nonce, 0, 32);
|
||||||
Array.Copy(sha1.Hash, 0, tmp_aes_key, 20, 12); // + SHA1(server_nonce, new_nonce)[0:12]
|
Array.Copy(sha1.Hash, 0, tmp_aes_key, 20, 12); // + SHA1(server_nonce, new_nonce)[0:12]
|
||||||
Array.Copy(sha1.Hash, 12, tmp_aes_iv, 0, 8); // tmp_aes_iv != SHA1(server_nonce, new_nonce)[12:8]
|
Array.Copy(sha1.Hash, 12, tmp_aes_iv, 0, 8); // tmp_aes_iv != SHA1(server_nonce, new_nonce)[12:8]
|
||||||
sha1.Initialize();
|
sha1.Initialize();
|
||||||
sha1.TransformBlock(new_nonce, 0, 32, null, 0);
|
sha1.TransformBlock(new_nonce, 0, 32, null, 0);
|
||||||
sha1.TransformFinalBlock(new_nonce, 0, 32);
|
sha1.TransformFinalBlock(new_nonce, 0, 32);
|
||||||
sha1.Hash.CopyTo(tmp_aes_iv, 8); // + SHA(new_nonce + new_nonce)
|
sha1.Hash.CopyTo(tmp_aes_iv, 8); // + SHA(new_nonce + new_nonce)
|
||||||
Array.Copy(new_nonce, 0, tmp_aes_iv, 28, 4); // + new_nonce[0:4]
|
Array.Copy(new_nonce, 0, tmp_aes_iv, 28, 4); // + new_nonce[0:4]
|
||||||
sha1.Initialize();
|
sha1.Initialize();
|
||||||
return (tmp_aes_key, tmp_aes_iv);
|
return (tmp_aes_key, tmp_aes_iv);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void CheckGoodPrime(BigInteger p, int g)
|
internal static void CheckGoodPrime(BigInteger p, int g)
|
||||||
|
|
@ -247,10 +247,7 @@ namespace WTelegram
|
||||||
var rsaParam = rsa.ExportParameters(false);
|
var rsaParam = rsa.ExportParameters(false);
|
||||||
if (rsaParam.Modulus[0] == 0) rsaParam.Modulus = rsaParam.Modulus[1..];
|
if (rsaParam.Modulus[0] == 0) rsaParam.Modulus = rsaParam.Modulus[1..];
|
||||||
var publicKey = new RSAPublicKey { n = rsaParam.Modulus, e = rsaParam.Exponent };
|
var publicKey = new RSAPublicKey { n = rsaParam.Modulus, e = rsaParam.Exponent };
|
||||||
using var memStream = new MemoryStream(280);
|
var bareData = publicKey.ToBytes();
|
||||||
using (var writer = new BinaryWriter(memStream))
|
|
||||||
writer.WriteTLObject(publicKey);
|
|
||||||
var bareData = memStream.ToArray();
|
|
||||||
var fingerprint = BinaryPrimitives.ReadInt64LittleEndian(sha1.ComputeHash(bareData, 4, bareData.Length - 4).AsSpan(12)); // 64 lower-order bits of SHA1
|
var fingerprint = BinaryPrimitives.ReadInt64LittleEndian(sha1.ComputeHash(bareData, 4, bareData.Length - 4).AsSpan(12)); // 64 lower-order bits of SHA1
|
||||||
PublicKeys[fingerprint] = publicKey;
|
PublicKeys[fingerprint] = publicKey;
|
||||||
Helpers.Log(1, $"Loaded a public key with fingerprint {fingerprint:X}");
|
Helpers.Log(1, $"Loaded a public key with fingerprint {fingerprint:X}");
|
||||||
|
|
@ -278,7 +275,7 @@ j4WcDuXc2CTHgH8gFTNhp/Y8/SpDOhvn9QIDAQAB
|
||||||
-----END RSA PUBLIC KEY-----");
|
-----END RSA PUBLIC KEY-----");
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static byte[] EncryptDecryptMessage(Span<byte> input, bool encrypt, int x, byte[] authKey, byte[] msgKey, int msgKeyOffset, SHA256 sha256)
|
public static byte[] EncryptDecryptMessage(Span<byte> input, bool encrypt, int x, byte[] authKey, byte[] msgKey, int msgKeyOffset, SHA256 sha256)
|
||||||
{
|
{
|
||||||
// first, construct AES key & IV
|
// first, construct AES key & IV
|
||||||
byte[] aes_key = new byte[32], aes_iv = new byte[32];
|
byte[] aes_key = new byte[32], aes_iv = new byte[32];
|
||||||
|
|
@ -299,7 +296,7 @@ j4WcDuXc2CTHgH8gFTNhp/Y8/SpDOhvn9QIDAQAB
|
||||||
return AES_IGE_EncryptDecrypt(input, aes_key, aes_iv, encrypt);
|
return AES_IGE_EncryptDecrypt(input, aes_key, aes_iv, encrypt);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static byte[] AES_IGE_EncryptDecrypt(Span<byte> input, byte[] aes_key, byte[] aes_iv, bool encrypt)
|
public static byte[] AES_IGE_EncryptDecrypt(Span<byte> input, byte[] aes_key, byte[] aes_iv, bool encrypt)
|
||||||
{
|
{
|
||||||
if (input.Length % 16 != 0) throw new WTException("AES_IGE input size not divisible by 16");
|
if (input.Length % 16 != 0) throw new WTException("AES_IGE input size not divisible by 16");
|
||||||
|
|
||||||
|
|
@ -307,8 +304,8 @@ j4WcDuXc2CTHgH8gFTNhp/Y8/SpDOhvn9QIDAQAB
|
||||||
var output = new byte[input.Length];
|
var output = new byte[input.Length];
|
||||||
var prevBytes = (byte[])aes_iv.Clone();
|
var prevBytes = (byte[])aes_iv.Clone();
|
||||||
var span = MemoryMarshal.Cast<byte, long>(input);
|
var span = MemoryMarshal.Cast<byte, long>(input);
|
||||||
var sout = MemoryMarshal.Cast<byte, long>(output);
|
var sout = MemoryMarshal.Cast<byte, long>(output.AsSpan());
|
||||||
var prev = MemoryMarshal.Cast<byte, long>(prevBytes);
|
var prev = MemoryMarshal.Cast<byte, long>(prevBytes.AsSpan());
|
||||||
if (!encrypt) { (prev[2], prev[0]) = (prev[0], prev[2]); (prev[3], prev[1]) = (prev[1], prev[3]); }
|
if (!encrypt) { (prev[2], prev[0]) = (prev[0], prev[2]); (prev[3], prev[1]) = (prev[1], prev[3]); }
|
||||||
for (int i = 0, count = input.Length / 8; i < count;)
|
for (int i = 0, count = input.Length / 8; i < count;)
|
||||||
{
|
{
|
||||||
|
|
@ -559,7 +556,7 @@ j4WcDuXc2CTHgH8gFTNhp/Y8/SpDOhvn9QIDAQAB
|
||||||
{
|
{
|
||||||
count = count + 15 & ~15;
|
count = count + 15 & ~15;
|
||||||
var span = MemoryMarshal.Cast<byte, long>(buffer.AsSpan(offset, count));
|
var span = MemoryMarshal.Cast<byte, long>(buffer.AsSpan(offset, count));
|
||||||
var prev = MemoryMarshal.Cast<byte, long>(_prevBytes);
|
var prev = MemoryMarshal.Cast<byte, long>(_prevBytes.AsSpan());
|
||||||
for (offset = 0, count /= 8; offset < count;)
|
for (offset = 0, count /= 8; offset < count;)
|
||||||
{
|
{
|
||||||
prev[0] ^= span[offset]; prev[1] ^= span[offset + 1];
|
prev[0] ^= span[offset]; prev[1] ^= span[offset + 1];
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,13 @@ namespace TL
|
||||||
foreach (var chat in chats)
|
foreach (var chat in chats)
|
||||||
if (chat is not Channel channel)
|
if (chat is not Channel channel)
|
||||||
_chats[chat.ID] = chat;
|
_chats[chat.ID] = chat;
|
||||||
else if (!channel.flags.HasFlag(Channel.Flags.min) || !_chats.TryGetValue(channel.id, out var prevChat) || prevChat is not Channel prevChannel || prevChannel.flags.HasFlag(Channel.Flags.min))
|
else if (!_chats.TryGetValue(channel.id, out var prevChat) || prevChat is not Channel prevChannel)
|
||||||
_chats[channel.id] = channel;
|
_chats[channel.id] = channel;
|
||||||
|
else if (!channel.flags.HasFlag(Channel.Flags.min) || prevChannel.flags.HasFlag(Channel.Flags.min))
|
||||||
|
{
|
||||||
|
if (channel.participants_count == 0) channel.participants_count = prevChannel.participants_count; // non-min channel can lack this info
|
||||||
|
_chats[channel.id] = channel;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{ // update previously full channel from min channel:
|
{ // update previously full channel from min channel:
|
||||||
const Channel.Flags updated_flags = (Channel.Flags)0x7FDC0BE0;
|
const Channel.Flags updated_flags = (Channel.Flags)0x7FDC0BE0;
|
||||||
|
|
|
||||||
|
|
@ -109,15 +109,13 @@ namespace TL
|
||||||
public Int128 new_nonce_hash3;
|
public Int128 new_nonce_hash3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DestroyAuthKeyRes : uint
|
public abstract partial class DestroyAuthKeyRes : IObject { }
|
||||||
{
|
[TLDef(0xF660E1D4)] //destroy_auth_key_ok#f660e1d4 = DestroyAuthKeyRes
|
||||||
///<summary>See <a href="https://corefork.telegram.org/constructor/destroy_auth_key_ok"/></summary>
|
public sealed partial class DestroyAuthKeyOk : DestroyAuthKeyRes { }
|
||||||
Ok = 0xF660E1D4,
|
[TLDef(0x0A9F2259)] //destroy_auth_key_none#0a9f2259 = DestroyAuthKeyRes
|
||||||
///<summary>See <a href="https://corefork.telegram.org/constructor/destroy_auth_key_none"/></summary>
|
public sealed partial class DestroyAuthKeyNone : DestroyAuthKeyRes { }
|
||||||
None = 0x0A9F2259,
|
[TLDef(0xEA109B13)] //destroy_auth_key_fail#ea109b13 = DestroyAuthKeyRes
|
||||||
///<summary>See <a href="https://corefork.telegram.org/constructor/destroy_auth_key_fail"/></summary>
|
public sealed partial class DestroyAuthKeyFail : DestroyAuthKeyRes { }
|
||||||
Fail = 0xEA109B13,
|
|
||||||
}
|
|
||||||
|
|
||||||
[TLDef(0x62D6B459)] //msgs_ack#62d6b459 msg_ids:Vector<long> = MsgsAck
|
[TLDef(0x62D6B459)] //msgs_ack#62d6b459 msg_ids:Vector<long> = MsgsAck
|
||||||
public sealed partial class MsgsAck : IObject
|
public sealed partial class MsgsAck : IObject
|
||||||
|
|
@ -327,12 +325,12 @@ namespace TL
|
||||||
});
|
});
|
||||||
|
|
||||||
public static Task<DestroyAuthKeyRes> DestroyAuthKey(this Client client)
|
public static Task<DestroyAuthKeyRes> DestroyAuthKey(this Client client)
|
||||||
=> client.InvokeBare(new DestroyAuthKey
|
=> client.Invoke(new DestroyAuthKey
|
||||||
{
|
{
|
||||||
});
|
});
|
||||||
|
|
||||||
public static Task<RpcDropAnswer> RpcDropAnswer(this Client client, long req_msg_id)
|
public static Task<RpcDropAnswer> RpcDropAnswer(this Client client, long req_msg_id)
|
||||||
=> client.InvokeBare(new Methods.RpcDropAnswer
|
=> client.Invoke(new Methods.RpcDropAnswer
|
||||||
{
|
{
|
||||||
req_msg_id = req_msg_id,
|
req_msg_id = req_msg_id,
|
||||||
});
|
});
|
||||||
|
|
@ -357,7 +355,7 @@ namespace TL
|
||||||
});
|
});
|
||||||
|
|
||||||
public static Task<DestroySessionRes> DestroySession(this Client client, long session_id)
|
public static Task<DestroySessionRes> DestroySession(this Client client, long session_id)
|
||||||
=> client.InvokeBare(new DestroySession
|
=> client.Invoke(new DestroySession
|
||||||
{
|
{
|
||||||
session_id = session_id,
|
session_id = session_id,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
266
src/TL.Schema.cs
266
src/TL.Schema.cs
|
|
@ -819,9 +819,9 @@ namespace TL
|
||||||
/// <summary>ID of the maximum read <a href="https://corefork.telegram.org/api/stories">story</a>. <br/>When updating the <a href="https://corefork.telegram.org/api/peers">local peer database</a>, do not apply changes to this field if the <c>min</c> flag of the incoming constructor is set.</summary>
|
/// <summary>ID of the maximum read <a href="https://corefork.telegram.org/api/stories">story</a>. <br/>When updating the <a href="https://corefork.telegram.org/api/peers">local peer database</a>, do not apply changes to this field if the <c>min</c> flag of the incoming constructor is set.</summary>
|
||||||
[IfFlag(37)] public int stories_max_id;
|
[IfFlag(37)] public int stories_max_id;
|
||||||
/// <summary>The user's <a href="https://corefork.telegram.org/api/colors">accent color</a>.</summary>
|
/// <summary>The user's <a href="https://corefork.telegram.org/api/colors">accent color</a>.</summary>
|
||||||
[IfFlag(40)] public PeerColor color;
|
[IfFlag(40)] public PeerColorBase color;
|
||||||
/// <summary>The user's <a href="https://corefork.telegram.org/api/colors">profile color</a>.</summary>
|
/// <summary>The user's <a href="https://corefork.telegram.org/api/colors">profile color</a>.</summary>
|
||||||
[IfFlag(41)] public PeerColor profile_color;
|
[IfFlag(41)] public PeerColorBase profile_color;
|
||||||
/// <summary>Monthly Active Users (MAU) of this bot (may be absent for small bots).</summary>
|
/// <summary>Monthly Active Users (MAU) of this bot (may be absent for small bots).</summary>
|
||||||
[IfFlag(44)] public int bot_active_users;
|
[IfFlag(44)] public int bot_active_users;
|
||||||
/// <summary>Describes a <a href="https://corefork.telegram.org/api/bots/verification">bot verification icon »</a>.</summary>
|
/// <summary>Describes a <a href="https://corefork.telegram.org/api/bots/verification">bot verification icon »</a>.</summary>
|
||||||
|
|
@ -919,6 +919,7 @@ namespace TL
|
||||||
has_bot_verification_icon = 0x4000,
|
has_bot_verification_icon = 0x4000,
|
||||||
/// <summary>Field <see cref="send_paid_messages_stars"/> has a value</summary>
|
/// <summary>Field <see cref="send_paid_messages_stars"/> has a value</summary>
|
||||||
has_send_paid_messages_stars = 0x8000,
|
has_send_paid_messages_stars = 0x8000,
|
||||||
|
bot_forum_view = 0x10000,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -962,7 +963,7 @@ namespace TL
|
||||||
public sealed partial class UserStatusOffline : UserStatus
|
public sealed partial class UserStatusOffline : UserStatus
|
||||||
{
|
{
|
||||||
/// <summary>Time the user was last seen online</summary>
|
/// <summary>Time the user was last seen online</summary>
|
||||||
public int was_online;
|
public DateTime was_online;
|
||||||
}
|
}
|
||||||
/// <summary>Online status: last seen recently <para>See <a href="https://corefork.telegram.org/constructor/userStatusRecently"/></para></summary>
|
/// <summary>Online status: last seen recently <para>See <a href="https://corefork.telegram.org/constructor/userStatusRecently"/></para></summary>
|
||||||
[TLDef(0x7B197DC8)]
|
[TLDef(0x7B197DC8)]
|
||||||
|
|
@ -1123,9 +1124,9 @@ namespace TL
|
||||||
/// <summary>ID of the maximum read <a href="https://corefork.telegram.org/api/stories">story</a>.</summary>
|
/// <summary>ID of the maximum read <a href="https://corefork.telegram.org/api/stories">story</a>.</summary>
|
||||||
[IfFlag(36)] public int stories_max_id;
|
[IfFlag(36)] public int stories_max_id;
|
||||||
/// <summary>The channel's <a href="https://corefork.telegram.org/api/colors">accent color</a>.</summary>
|
/// <summary>The channel's <a href="https://corefork.telegram.org/api/colors">accent color</a>.</summary>
|
||||||
[IfFlag(39)] public PeerColor color;
|
[IfFlag(39)] public PeerColorBase color;
|
||||||
/// <summary>The channel's <a href="https://corefork.telegram.org/api/colors">profile color</a>.</summary>
|
/// <summary>The channel's <a href="https://corefork.telegram.org/api/colors">profile color</a>.</summary>
|
||||||
[IfFlag(40)] public PeerColor profile_color;
|
[IfFlag(40)] public PeerColorBase profile_color;
|
||||||
/// <summary><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a></summary>
|
/// <summary><a href="https://corefork.telegram.org/api/emoji-status">Emoji status</a></summary>
|
||||||
[IfFlag(41)] public EmojiStatusBase emoji_status;
|
[IfFlag(41)] public EmojiStatusBase emoji_status;
|
||||||
/// <summary><a href="https://corefork.telegram.org/api/boost">Boost level</a>. <br/>Changes to this flag should invalidate the local <see cref="ChannelFull"/> cache for this channel/supergroup ID, see <a href="https://corefork.telegram.org/api/peers#full-info-database">here »</a> for more info.</summary>
|
/// <summary><a href="https://corefork.telegram.org/api/boost">Boost level</a>. <br/>Changes to this flag should invalidate the local <see cref="ChannelFull"/> cache for this channel/supergroup ID, see <a href="https://corefork.telegram.org/api/peers#full-info-database">here »</a> for more info.</summary>
|
||||||
|
|
@ -2744,6 +2745,7 @@ namespace TL
|
||||||
{
|
{
|
||||||
/// <summary>Field <see cref="icon_emoji_id"/> has a value</summary>
|
/// <summary>Field <see cref="icon_emoji_id"/> has a value</summary>
|
||||||
has_icon_emoji_id = 0x1,
|
has_icon_emoji_id = 0x1,
|
||||||
|
title_missing = 0x2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary><a href="https://corefork.telegram.org/api/forum#forum-topics">Forum topic</a> information was edited. <para>See <a href="https://corefork.telegram.org/constructor/messageActionTopicEdit"/></para></summary>
|
/// <summary><a href="https://corefork.telegram.org/api/forum#forum-topics">Forum topic</a> information was edited. <para>See <a href="https://corefork.telegram.org/constructor/messageActionTopicEdit"/></para></summary>
|
||||||
|
|
@ -2988,7 +2990,7 @@ namespace TL
|
||||||
[IfFlag(12)] public long saved_id;
|
[IfFlag(12)] public long saved_id;
|
||||||
/// <summary><a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">Hash to prepay for a gift upgrade separately »</a>.</summary>
|
/// <summary><a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">Hash to prepay for a gift upgrade separately »</a>.</summary>
|
||||||
[IfFlag(14)] public string prepaid_upgrade_hash;
|
[IfFlag(14)] public string prepaid_upgrade_hash;
|
||||||
/// <summary>For <a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">separate upgrades</a>, the identifier of the message with the gift whose upgrade was prepaid (valid for everyone, since all messages across all private chats with users share the same message ID sequence, and for channels the service message will already be sent to the channel, that will contain the service message with the original gift).</summary>
|
/// <summary>For <a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">separate upgrades</a>, the identifier of the message with the gift whose upgrade was prepaid (only valid for the receiver of the service message).</summary>
|
||||||
[IfFlag(15)] public int gift_msg_id;
|
[IfFlag(15)] public int gift_msg_id;
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
[Flags] public enum Flags : uint
|
||||||
|
|
@ -3026,7 +3028,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>A <a href="https://corefork.telegram.org/api/gifts">gift »</a> was upgraded to a <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible gift »</a>. <para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGiftUnique"/></para></summary>
|
/// <summary>A <a href="https://corefork.telegram.org/api/gifts">gift »</a> was upgraded to a <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible gift »</a>. <para>See <a href="https://corefork.telegram.org/constructor/messageActionStarGiftUnique"/></para></summary>
|
||||||
[TLDef(0x34F762F3)]
|
[TLDef(0x95728543)]
|
||||||
public sealed partial class MessageActionStarGiftUnique : MessageAction
|
public sealed partial class MessageActionStarGiftUnique : MessageAction
|
||||||
{
|
{
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||||
|
|
@ -3049,6 +3051,7 @@ namespace TL
|
||||||
[IfFlag(9)] public DateTime can_transfer_at;
|
[IfFlag(9)] public DateTime can_transfer_at;
|
||||||
/// <summary>If set, indicates that the current gift can't be <a href="https://corefork.telegram.org/api/gifts#reselling-collectible-gifts">resold »</a> yet: the owner will be able to put it up for sale at the specified unixtime.</summary>
|
/// <summary>If set, indicates that the current gift can't be <a href="https://corefork.telegram.org/api/gifts#reselling-collectible-gifts">resold »</a> yet: the owner will be able to put it up for sale at the specified unixtime.</summary>
|
||||||
[IfFlag(10)] public DateTime can_resell_at;
|
[IfFlag(10)] public DateTime can_resell_at;
|
||||||
|
[IfFlag(12)] public long drop_original_details_stars;
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
[Flags] public enum Flags : uint
|
||||||
{
|
{
|
||||||
|
|
@ -3076,6 +3079,9 @@ namespace TL
|
||||||
has_can_resell_at = 0x400,
|
has_can_resell_at = 0x400,
|
||||||
/// <summary>The sender has pre-paid for the upgrade of this gift to a collectible gift.</summary>
|
/// <summary>The sender has pre-paid for the upgrade of this gift to a collectible gift.</summary>
|
||||||
prepaid_upgrade = 0x800,
|
prepaid_upgrade = 0x800,
|
||||||
|
/// <summary>Field <see cref="drop_original_details_stars"/> has a value</summary>
|
||||||
|
has_drop_original_details_stars = 0x1000,
|
||||||
|
assigned = 0x2000,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>Sent from peer A to B, indicates that A refunded all <a href="https://corefork.telegram.org/api/stars">stars</a> B previously paid to send messages to A, see <a href="https://corefork.telegram.org/api/paid-messages">here »</a> for more info on paid messages. <para>See <a href="https://corefork.telegram.org/constructor/messageActionPaidMessagesRefunded"/></para></summary>
|
/// <summary>Sent from peer A to B, indicates that A refunded all <a href="https://corefork.telegram.org/api/stars">stars</a> B previously paid to send messages to A, see <a href="https://corefork.telegram.org/api/paid-messages">here »</a> for more info on paid messages. <para>See <a href="https://corefork.telegram.org/constructor/messageActionPaidMessagesRefunded"/></para></summary>
|
||||||
|
|
@ -3215,6 +3221,12 @@ namespace TL
|
||||||
has_transaction_id = 0x1,
|
has_transaction_id = 0x1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messageActionSuggestBirthday"/></para></summary>
|
||||||
|
[TLDef(0x2C8F2A25)]
|
||||||
|
public sealed partial class MessageActionSuggestBirthday : MessageAction
|
||||||
|
{
|
||||||
|
public Birthday birthday;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Chat info. <para>See <a href="https://corefork.telegram.org/type/Dialog"/></para> <para>Derived classes: <see cref="Dialog"/>, <see cref="DialogFolder"/></para></summary>
|
/// <summary>Chat info. <para>See <a href="https://corefork.telegram.org/type/Dialog"/></para> <para>Derived classes: <see cref="Dialog"/>, <see cref="DialogFolder"/></para></summary>
|
||||||
public abstract partial class DialogBase : IObject
|
public abstract partial class DialogBase : IObject
|
||||||
|
|
@ -3495,7 +3507,7 @@ namespace TL
|
||||||
public Auth_AuthorizationBase authorization;
|
public Auth_AuthorizationBase authorization;
|
||||||
}
|
}
|
||||||
/// <summary>Official apps may receive this constructor, indicating that due to the high cost of SMS verification codes for the user's country/provider, the user must purchase a <a href="https://corefork.telegram.org/api/premium">Telegram Premium</a> subscription in order to proceed with the login/signup. <para>See <a href="https://corefork.telegram.org/constructor/auth.sentCodePaymentRequired"/></para></summary>
|
/// <summary>Official apps may receive this constructor, indicating that due to the high cost of SMS verification codes for the user's country/provider, the user must purchase a <a href="https://corefork.telegram.org/api/premium">Telegram Premium</a> subscription in order to proceed with the login/signup. <para>See <a href="https://corefork.telegram.org/constructor/auth.sentCodePaymentRequired"/></para></summary>
|
||||||
[TLDef(0xD7A2FCF9)]
|
[TLDef(0xE0955A3C)]
|
||||||
public sealed partial class Auth_SentCodePaymentRequired : Auth_SentCodeBase
|
public sealed partial class Auth_SentCodePaymentRequired : Auth_SentCodeBase
|
||||||
{
|
{
|
||||||
/// <summary>Store identifier of the Telegram Premium subscription.</summary>
|
/// <summary>Store identifier of the Telegram Premium subscription.</summary>
|
||||||
|
|
@ -3506,6 +3518,8 @@ namespace TL
|
||||||
public string support_email_address;
|
public string support_email_address;
|
||||||
/// <summary>The mandatory subject for the email.</summary>
|
/// <summary>The mandatory subject for the email.</summary>
|
||||||
public string support_email_subject;
|
public string support_email_subject;
|
||||||
|
public string currency;
|
||||||
|
public long amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Object contains info on user authorization. <para>See <a href="https://corefork.telegram.org/type/auth.Authorization"/></para> <para>Derived classes: <see cref="Auth_Authorization"/>, <see cref="Auth_AuthorizationSignUpRequired"/></para></summary>
|
/// <summary>Object contains info on user authorization. <para>See <a href="https://corefork.telegram.org/type/auth.Authorization"/></para> <para>Derived classes: <see cref="Auth_Authorization"/>, <see cref="Auth_AuthorizationSignUpRequired"/></para></summary>
|
||||||
|
|
@ -3852,7 +3866,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Extended user info <para>See <a href="https://corefork.telegram.org/constructor/userFull"/></para></summary>
|
/// <summary>Extended user info <para>See <a href="https://corefork.telegram.org/constructor/userFull"/></para></summary>
|
||||||
[TLDef(0xC577B5AD)]
|
[TLDef(0xA02BC13E)]
|
||||||
public sealed partial class UserFull : IObject
|
public sealed partial class UserFull : IObject
|
||||||
{
|
{
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||||
|
|
@ -3931,6 +3945,7 @@ namespace TL
|
||||||
[IfFlag(52)] public ProfileTab main_tab;
|
[IfFlag(52)] public ProfileTab main_tab;
|
||||||
/// <summary>The first song on the music tab of the profile, see <a href="https://corefork.telegram.org/api/profile#music">here »</a> for more info on the music profile tab.</summary>
|
/// <summary>The first song on the music tab of the profile, see <a href="https://corefork.telegram.org/api/profile#music">here »</a> for more info on the music profile tab.</summary>
|
||||||
[IfFlag(53)] public DocumentBase saved_music;
|
[IfFlag(53)] public DocumentBase saved_music;
|
||||||
|
[IfFlag(54)] public TextWithEntities note;
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
[Flags] public enum Flags : uint
|
||||||
{
|
{
|
||||||
|
|
@ -4032,6 +4047,8 @@ namespace TL
|
||||||
has_main_tab = 0x100000,
|
has_main_tab = 0x100000,
|
||||||
/// <summary>Field <see cref="saved_music"/> has a value</summary>
|
/// <summary>Field <see cref="saved_music"/> has a value</summary>
|
||||||
has_saved_music = 0x200000,
|
has_saved_music = 0x200000,
|
||||||
|
/// <summary>Field <see cref="note"/> has a value</summary>
|
||||||
|
has_note = 0x400000,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4165,15 +4182,17 @@ namespace TL
|
||||||
{
|
{
|
||||||
/// <summary>List of messages</summary>
|
/// <summary>List of messages</summary>
|
||||||
public virtual MessageBase[] Messages => default;
|
public virtual MessageBase[] Messages => default;
|
||||||
|
public virtual ForumTopicBase[] Topics => default;
|
||||||
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
|
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
|
||||||
public abstract IPeerInfo UserOrChat(Peer peer);
|
public abstract IPeerInfo UserOrChat(Peer peer);
|
||||||
}
|
}
|
||||||
/// <summary>Full list of messages with auxiliary data. <para>See <a href="https://corefork.telegram.org/constructor/messages.messages"/></para></summary>
|
/// <summary>Full list of messages with auxiliary data. <para>See <a href="https://corefork.telegram.org/constructor/messages.messages"/></para></summary>
|
||||||
[TLDef(0x8C718E87)]
|
[TLDef(0x1D73E7EA)]
|
||||||
public partial class Messages_Messages : Messages_MessagesBase, IPeerResolver
|
public partial class Messages_Messages : Messages_MessagesBase, IPeerResolver
|
||||||
{
|
{
|
||||||
/// <summary>List of messages</summary>
|
/// <summary>List of messages</summary>
|
||||||
public MessageBase[] messages;
|
public MessageBase[] messages;
|
||||||
|
public ForumTopicBase[] topics;
|
||||||
/// <summary>List of chats mentioned in dialogs</summary>
|
/// <summary>List of chats mentioned in dialogs</summary>
|
||||||
public Dictionary<long, ChatBase> chats;
|
public Dictionary<long, ChatBase> chats;
|
||||||
/// <summary>List of users mentioned in messages and chats</summary>
|
/// <summary>List of users mentioned in messages and chats</summary>
|
||||||
|
|
@ -4181,11 +4200,12 @@ namespace TL
|
||||||
|
|
||||||
/// <summary>List of messages</summary>
|
/// <summary>List of messages</summary>
|
||||||
public override MessageBase[] Messages => messages;
|
public override MessageBase[] Messages => messages;
|
||||||
|
public override ForumTopicBase[] Topics => topics;
|
||||||
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
|
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
|
||||||
public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
|
public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
|
||||||
}
|
}
|
||||||
/// <summary>Incomplete list of messages and auxiliary data. <para>See <a href="https://corefork.telegram.org/constructor/messages.messagesSlice"/></para></summary>
|
/// <summary>Incomplete list of messages and auxiliary data. <para>See <a href="https://corefork.telegram.org/constructor/messages.messagesSlice"/></para></summary>
|
||||||
[TLDef(0x762B263D)]
|
[TLDef(0x5F206716)]
|
||||||
public sealed partial class Messages_MessagesSlice : Messages_Messages, IPeerResolver
|
public sealed partial class Messages_MessagesSlice : Messages_Messages, IPeerResolver
|
||||||
{
|
{
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||||
|
|
@ -4242,6 +4262,8 @@ namespace TL
|
||||||
|
|
||||||
/// <summary>Found messages</summary>
|
/// <summary>Found messages</summary>
|
||||||
public override MessageBase[] Messages => messages;
|
public override MessageBase[] Messages => messages;
|
||||||
|
/// <summary><a href="https://corefork.telegram.org/api/forum#forum-topics">Forum topic</a> information</summary>
|
||||||
|
public override ForumTopicBase[] Topics => topics;
|
||||||
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
|
/// <summary>returns a <see cref="User"/> or <see cref="ChatBase"/> for the given Peer</summary>
|
||||||
public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
|
public override IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
|
||||||
}
|
}
|
||||||
|
|
@ -4358,6 +4380,7 @@ namespace TL
|
||||||
public abstract partial class Update : IObject
|
public abstract partial class Update : IObject
|
||||||
{
|
{
|
||||||
public virtual (long mbox_id, int pts, int pts_count) GetMBox() => default;
|
public virtual (long mbox_id, int pts, int pts_count) GetMBox() => default;
|
||||||
|
public virtual void SetPTS(int new_pts, int new_pts_count) { }
|
||||||
}
|
}
|
||||||
/// <summary>New message in a private chat or in a <a href="https://corefork.telegram.org/api/channel#basic-groups">basic group</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateNewMessage"/></para></summary>
|
/// <summary>New message in a private chat or in a <a href="https://corefork.telegram.org/api/channel#basic-groups">basic group</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateNewMessage"/></para></summary>
|
||||||
[TLDef(0x1F2B0AFD)]
|
[TLDef(0x1F2B0AFD)]
|
||||||
|
|
@ -4371,6 +4394,7 @@ namespace TL
|
||||||
public int pts_count;
|
public int pts_count;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>Sent message with <strong>random_id</strong> client identifier was assigned an identifier. <para>See <a href="https://corefork.telegram.org/constructor/updateMessageID"/></para></summary>
|
/// <summary>Sent message with <strong>random_id</strong> client identifier was assigned an identifier. <para>See <a href="https://corefork.telegram.org/constructor/updateMessageID"/></para></summary>
|
||||||
[TLDef(0x4E90BFD6)]
|
[TLDef(0x4E90BFD6)]
|
||||||
|
|
@ -4393,13 +4417,24 @@ namespace TL
|
||||||
public int pts_count;
|
public int pts_count;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing <para>See <a href="https://corefork.telegram.org/constructor/updateUserTyping"/></para></summary>
|
/// <summary>The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing <para>See <a href="https://corefork.telegram.org/constructor/updateUserTyping"/></para></summary>
|
||||||
[TLDef(0xC01E857F, inheritBefore = true)]
|
[TLDef(0x2A17BF5C)]
|
||||||
public sealed partial class UpdateUserTyping : UpdateUser
|
public sealed partial class UpdateUserTyping : Update
|
||||||
{
|
{
|
||||||
|
public Flags flags;
|
||||||
|
/// <summary>User id</summary>
|
||||||
|
public long user_id;
|
||||||
|
[IfFlag(0)] public int top_msg_id;
|
||||||
/// <summary>Action type</summary>
|
/// <summary>Action type</summary>
|
||||||
public SendMessageAction action;
|
public SendMessageAction action;
|
||||||
|
|
||||||
|
[Flags] public enum Flags : uint
|
||||||
|
{
|
||||||
|
/// <summary>Field <see cref="top_msg_id"/> has a value</summary>
|
||||||
|
has_top_msg_id = 0x1,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing <para>See <a href="https://corefork.telegram.org/constructor/updateChatUserTyping"/></para></summary>
|
/// <summary>The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing <para>See <a href="https://corefork.telegram.org/constructor/updateChatUserTyping"/></para></summary>
|
||||||
[TLDef(0x83487AF0, inheritBefore = true)]
|
[TLDef(0x83487AF0, inheritBefore = true)]
|
||||||
|
|
@ -4466,6 +4501,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing. <para>See <a href="https://corefork.telegram.org/constructor/updateEncryptedChatTyping"/></para></summary>
|
/// <summary>Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing. <para>See <a href="https://corefork.telegram.org/constructor/updateEncryptedChatTyping"/></para></summary>
|
||||||
[TLDef(0x1710F156)]
|
[TLDef(0x1710F156)]
|
||||||
|
|
@ -4576,7 +4612,7 @@ namespace TL
|
||||||
public string phone;
|
public string phone;
|
||||||
}
|
}
|
||||||
/// <summary>Incoming messages were read <para>See <a href="https://corefork.telegram.org/constructor/updateReadHistoryInbox"/></para></summary>
|
/// <summary>Incoming messages were read <para>See <a href="https://corefork.telegram.org/constructor/updateReadHistoryInbox"/></para></summary>
|
||||||
[TLDef(0x9C974FDF)]
|
[TLDef(0x9E84BC99)]
|
||||||
public sealed partial class UpdateReadHistoryInbox : Update
|
public sealed partial class UpdateReadHistoryInbox : Update
|
||||||
{
|
{
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||||
|
|
@ -4585,6 +4621,7 @@ namespace TL
|
||||||
[IfFlag(0)] public int folder_id;
|
[IfFlag(0)] public int folder_id;
|
||||||
/// <summary>Peer</summary>
|
/// <summary>Peer</summary>
|
||||||
public Peer peer;
|
public Peer peer;
|
||||||
|
[IfFlag(1)] public int top_msg_id;
|
||||||
/// <summary>Maximum ID of messages read</summary>
|
/// <summary>Maximum ID of messages read</summary>
|
||||||
public int max_id;
|
public int max_id;
|
||||||
/// <summary>Number of messages that are still unread</summary>
|
/// <summary>Number of messages that are still unread</summary>
|
||||||
|
|
@ -4598,9 +4635,12 @@ namespace TL
|
||||||
{
|
{
|
||||||
/// <summary>Field <see cref="folder_id"/> has a value</summary>
|
/// <summary>Field <see cref="folder_id"/> has a value</summary>
|
||||||
has_folder_id = 0x1,
|
has_folder_id = 0x1,
|
||||||
|
/// <summary>Field <see cref="top_msg_id"/> has a value</summary>
|
||||||
|
has_top_msg_id = 0x2,
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>Outgoing messages were read <para>See <a href="https://corefork.telegram.org/constructor/updateReadHistoryOutbox"/></para></summary>
|
/// <summary>Outgoing messages were read <para>See <a href="https://corefork.telegram.org/constructor/updateReadHistoryOutbox"/></para></summary>
|
||||||
[TLDef(0x2F2F21BF)]
|
[TLDef(0x2F2F21BF)]
|
||||||
|
|
@ -4616,6 +4656,7 @@ namespace TL
|
||||||
public int pts_count;
|
public int pts_count;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>An <a href="https://instantview.telegram.org">instant view</a> webpage preview was generated <para>See <a href="https://corefork.telegram.org/constructor/updateWebPage"/></para></summary>
|
/// <summary>An <a href="https://instantview.telegram.org">instant view</a> webpage preview was generated <para>See <a href="https://corefork.telegram.org/constructor/updateWebPage"/></para></summary>
|
||||||
[TLDef(0x7F891213)]
|
[TLDef(0x7F891213)]
|
||||||
|
|
@ -4629,6 +4670,7 @@ namespace TL
|
||||||
public int pts_count;
|
public int pts_count;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>Contents of messages in the common <a href="https://corefork.telegram.org/api/updates">message box</a> were read (emitted specifically for messages like voice messages or video, only once the media is watched and marked as read using <see cref="SchemaExtensions.Messages_ReadMessageContents">Messages_ReadMessageContents</see>). <para>See <a href="https://corefork.telegram.org/constructor/updateReadMessagesContents"/></para></summary>
|
/// <summary>Contents of messages in the common <a href="https://corefork.telegram.org/api/updates">message box</a> were read (emitted specifically for messages like voice messages or video, only once the media is watched and marked as read using <see cref="SchemaExtensions.Messages_ReadMessageContents">Messages_ReadMessageContents</see>). <para>See <a href="https://corefork.telegram.org/constructor/updateReadMessagesContents"/></para></summary>
|
||||||
[TLDef(0xF8227181)]
|
[TLDef(0xF8227181)]
|
||||||
|
|
@ -4652,6 +4694,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>There are new updates in the specified channel, the client must fetch them.<br/>If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts. <para>See <a href="https://corefork.telegram.org/constructor/updateChannelTooLong"/></para></summary>
|
/// <summary>There are new updates in the specified channel, the client must fetch them.<br/>If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts. <para>See <a href="https://corefork.telegram.org/constructor/updateChannelTooLong"/></para></summary>
|
||||||
[TLDef(0x108D941F)]
|
[TLDef(0x108D941F)]
|
||||||
|
|
@ -4671,6 +4714,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (channel_id, pts, 0);
|
public override (long, int, int) GetMBox() => (channel_id, pts, 0);
|
||||||
|
public override void SetPTS(int new_pts, int _) => pts = new_pts;
|
||||||
}
|
}
|
||||||
/// <summary>Channel/supergroup (<see cref="Channel"/> and/or <see cref="ChannelFull"/>) information was updated. <para>See <a href="https://corefork.telegram.org/constructor/updateChannel"/></para></summary>
|
/// <summary>Channel/supergroup (<see cref="Channel"/> and/or <see cref="ChannelFull"/>) information was updated. <para>See <a href="https://corefork.telegram.org/constructor/updateChannel"/></para></summary>
|
||||||
[TLDef(0x635B4C09)]
|
[TLDef(0x635B4C09)]
|
||||||
|
|
@ -4684,6 +4728,7 @@ namespace TL
|
||||||
public sealed partial class UpdateNewChannelMessage : UpdateNewMessage
|
public sealed partial class UpdateNewChannelMessage : UpdateNewMessage
|
||||||
{
|
{
|
||||||
public override (long, int, int) GetMBox() => (message.Peer is PeerChannel pc ? pc.channel_id : 0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (message.Peer is PeerChannel pc ? pc.channel_id : 0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>Incoming messages in a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> were read <para>See <a href="https://corefork.telegram.org/constructor/updateReadChannelInbox"/></para></summary>
|
/// <summary>Incoming messages in a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> were read <para>See <a href="https://corefork.telegram.org/constructor/updateReadChannelInbox"/></para></summary>
|
||||||
[TLDef(0x922E6E10)]
|
[TLDef(0x922E6E10)]
|
||||||
|
|
@ -4709,6 +4754,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (channel_id, pts, 0);
|
public override (long, int, int) GetMBox() => (channel_id, pts, 0);
|
||||||
|
public override void SetPTS(int new_pts, int _) => pts = new_pts;
|
||||||
}
|
}
|
||||||
/// <summary>Some messages in a <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a> were deleted <para>See <a href="https://corefork.telegram.org/constructor/updateDeleteChannelMessages"/></para></summary>
|
/// <summary>Some messages in a <a href="https://corefork.telegram.org/api/channel">supergroup/channel</a> were deleted <para>See <a href="https://corefork.telegram.org/constructor/updateDeleteChannelMessages"/></para></summary>
|
||||||
[TLDef(0xC32D5B12)]
|
[TLDef(0xC32D5B12)]
|
||||||
|
|
@ -4718,6 +4764,7 @@ namespace TL
|
||||||
public long channel_id;
|
public long channel_id;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (channel_id, pts, pts_count);
|
public override (long, int, int) GetMBox() => (channel_id, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>The view counter of a message in a channel has changed <para>See <a href="https://corefork.telegram.org/constructor/updateChannelMessageViews"/></para></summary>
|
/// <summary>The view counter of a message in a channel has changed <para>See <a href="https://corefork.telegram.org/constructor/updateChannelMessageViews"/></para></summary>
|
||||||
[TLDef(0xF226AC08, inheritBefore = true)]
|
[TLDef(0xF226AC08, inheritBefore = true)]
|
||||||
|
|
@ -4838,6 +4885,7 @@ namespace TL
|
||||||
public sealed partial class UpdateEditChannelMessage : UpdateEditMessage
|
public sealed partial class UpdateEditChannelMessage : UpdateEditMessage
|
||||||
{
|
{
|
||||||
public override (long, int, int) GetMBox() => (message.Peer is PeerChannel pc ? pc.channel_id : 0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (message.Peer is PeerChannel pc ? pc.channel_id : 0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>A callback button was pressed, and the button data was sent to the bot that created the button <para>See <a href="https://corefork.telegram.org/constructor/updateBotCallbackQuery"/></para></summary>
|
/// <summary>A callback button was pressed, and the button data was sent to the bot that created the button <para>See <a href="https://corefork.telegram.org/constructor/updateBotCallbackQuery"/></para></summary>
|
||||||
[TLDef(0xB9CFC48D)]
|
[TLDef(0xB9CFC48D)]
|
||||||
|
|
@ -4880,6 +4928,7 @@ namespace TL
|
||||||
public int pts_count;
|
public int pts_count;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>This notification is received by bots when a button is pressed <para>See <a href="https://corefork.telegram.org/constructor/updateInlineBotCallbackQuery"/></para></summary>
|
/// <summary>This notification is received by bots when a button is pressed <para>See <a href="https://corefork.telegram.org/constructor/updateInlineBotCallbackQuery"/></para></summary>
|
||||||
[TLDef(0x691E9052)]
|
[TLDef(0x691E9052)]
|
||||||
|
|
@ -4960,6 +5009,7 @@ namespace TL
|
||||||
public long channel_id;
|
public long channel_id;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (channel_id, pts, pts_count);
|
public override (long, int, int) GetMBox() => (channel_id, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>A dialog was pinned/unpinned <para>See <a href="https://corefork.telegram.org/constructor/updateDialogPinned"/></para></summary>
|
/// <summary>A dialog was pinned/unpinned <para>See <a href="https://corefork.telegram.org/constructor/updateDialogPinned"/></para></summary>
|
||||||
[TLDef(0x6E6FE51C)]
|
[TLDef(0x6E6FE51C)]
|
||||||
|
|
@ -5177,6 +5227,7 @@ namespace TL
|
||||||
public int pts_count;
|
public int pts_count;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>Settings of a certain peer have changed <para>See <a href="https://corefork.telegram.org/constructor/updatePeerSettings"/></para></summary>
|
/// <summary>Settings of a certain peer have changed <para>See <a href="https://corefork.telegram.org/constructor/updatePeerSettings"/></para></summary>
|
||||||
[TLDef(0x6A7E7366)]
|
[TLDef(0x6A7E7366)]
|
||||||
|
|
@ -5253,6 +5304,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>A new <a href="https://corefork.telegram.org/api/folders">folder</a> was added <para>See <a href="https://corefork.telegram.org/constructor/updateDialogFilter"/></para></summary>
|
/// <summary>A new <a href="https://corefork.telegram.org/api/folders">folder</a> was added <para>See <a href="https://corefork.telegram.org/constructor/updateDialogFilter"/></para></summary>
|
||||||
[TLDef(0x26FFDE7D)]
|
[TLDef(0x26FFDE7D)]
|
||||||
|
|
@ -5393,6 +5445,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
public override (long, int, int) GetMBox() => (0, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>Messages were pinned/unpinned in a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> <para>See <a href="https://corefork.telegram.org/constructor/updatePinnedChannelMessages"/></para></summary>
|
/// <summary>Messages were pinned/unpinned in a <a href="https://corefork.telegram.org/api/channel">channel/supergroup</a> <para>See <a href="https://corefork.telegram.org/constructor/updatePinnedChannelMessages"/></para></summary>
|
||||||
[TLDef(0x5BB98608)]
|
[TLDef(0x5BB98608)]
|
||||||
|
|
@ -5416,6 +5469,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (channel_id, pts, pts_count);
|
public override (long, int, int) GetMBox() => (channel_id, pts, pts_count);
|
||||||
|
public override void SetPTS(int new_pts, int new_pts_count) => (pts, pts_count) = (new_pts, new_pts_count);
|
||||||
}
|
}
|
||||||
/// <summary>Chat (<see cref="Chat"/> and/or <see cref="ChatFull"/>) information was updated. <para>See <a href="https://corefork.telegram.org/constructor/updateChat"/></para></summary>
|
/// <summary>Chat (<see cref="Chat"/> and/or <see cref="ChatFull"/>) information was updated. <para>See <a href="https://corefork.telegram.org/constructor/updateChat"/></para></summary>
|
||||||
[TLDef(0xF89A6A4E)]
|
[TLDef(0xF89A6A4E)]
|
||||||
|
|
@ -5503,6 +5557,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>A participant has left, joined, was banned or admined in a <a href="https://corefork.telegram.org/api/channel">channel or supergroup</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateChannelParticipant"/></para></summary>
|
/// <summary>A participant has left, joined, was banned or admined in a <a href="https://corefork.telegram.org/api/channel">channel or supergroup</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateChannelParticipant"/></para></summary>
|
||||||
[TLDef(0x985D3ABB)]
|
[TLDef(0x985D3ABB)]
|
||||||
|
|
@ -5540,6 +5595,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>A bot was stopped or re-started. <para>See <a href="https://corefork.telegram.org/constructor/updateBotStopped"/></para></summary>
|
/// <summary>A bot was stopped or re-started. <para>See <a href="https://corefork.telegram.org/constructor/updateBotStopped"/></para></summary>
|
||||||
[TLDef(0xC4870A49)]
|
[TLDef(0xC4870A49)]
|
||||||
|
|
@ -5555,6 +5611,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>New WebRTC parameters <para>See <a href="https://corefork.telegram.org/constructor/updateGroupCallConnection"/></para></summary>
|
/// <summary>New WebRTC parameters <para>See <a href="https://corefork.telegram.org/constructor/updateGroupCallConnection"/></para></summary>
|
||||||
[TLDef(0x0B783982)]
|
[TLDef(0x0B783982)]
|
||||||
|
|
@ -5611,6 +5668,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>New <a href="https://corefork.telegram.org/api/reactions">message reactions »</a> are available <para>See <a href="https://corefork.telegram.org/constructor/updateMessageReactions"/></para></summary>
|
/// <summary>New <a href="https://corefork.telegram.org/api/reactions">message reactions »</a> are available <para>See <a href="https://corefork.telegram.org/constructor/updateMessageReactions"/></para></summary>
|
||||||
[TLDef(0x1E297BFA)]
|
[TLDef(0x1E297BFA)]
|
||||||
|
|
@ -5724,40 +5782,6 @@ namespace TL
|
||||||
/// <summary>Revealed media, contains only <see cref="MessageExtendedMedia"/>s.</summary>
|
/// <summary>Revealed media, contains only <see cref="MessageExtendedMedia"/>s.</summary>
|
||||||
public MessageExtendedMediaBase[] extended_media;
|
public MessageExtendedMediaBase[] extended_media;
|
||||||
}
|
}
|
||||||
/// <summary>A <a href="https://corefork.telegram.org/api/forum#forum-topics">forum topic »</a> was pinned or unpinned. <para>See <a href="https://corefork.telegram.org/constructor/updateChannelPinnedTopic"/></para></summary>
|
|
||||||
[TLDef(0x192EFBE3)]
|
|
||||||
public sealed partial class UpdateChannelPinnedTopic : Update
|
|
||||||
{
|
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
|
||||||
public Flags flags;
|
|
||||||
/// <summary>The forum ID</summary>
|
|
||||||
public long channel_id;
|
|
||||||
/// <summary>The topic ID</summary>
|
|
||||||
public int topic_id;
|
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
|
||||||
{
|
|
||||||
/// <summary>Whether the topic was pinned or unpinned</summary>
|
|
||||||
pinned = 0x1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>The <a href="https://corefork.telegram.org/api/forum#forum-topics">pinned topics</a> of a forum have changed. <para>See <a href="https://corefork.telegram.org/constructor/updateChannelPinnedTopics"/></para></summary>
|
|
||||||
[TLDef(0xFE198602)]
|
|
||||||
public sealed partial class UpdateChannelPinnedTopics : Update
|
|
||||||
{
|
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
|
||||||
public Flags flags;
|
|
||||||
/// <summary>Forum ID.</summary>
|
|
||||||
public long channel_id;
|
|
||||||
/// <summary>Ordered list containing the IDs of all pinned topics.</summary>
|
|
||||||
[IfFlag(0)] public int[] order;
|
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
|
||||||
{
|
|
||||||
/// <summary>Field <see cref="order"/> has a value</summary>
|
|
||||||
has_order = 0x1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>User (<see cref="User"/> and/or <see cref="UserFull"/>) information was updated. <para>See <a href="https://corefork.telegram.org/constructor/updateUser"/></para></summary>
|
/// <summary>User (<see cref="User"/> and/or <see cref="UserFull"/>) information was updated. <para>See <a href="https://corefork.telegram.org/constructor/updateUser"/></para></summary>
|
||||||
[TLDef(0x20529438)]
|
[TLDef(0x20529438)]
|
||||||
public partial class UpdateUser : Update
|
public partial class UpdateUser : Update
|
||||||
|
|
@ -5825,6 +5849,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>Users may also choose to display messages from all topics as if they were sent to a normal group, using a "View as messages" setting in the local client.<br/>This setting only affects the current account, and is synced to other logged in sessions using the <see cref="SchemaExtensions.Channels_ToggleViewForumAsMessages">Channels_ToggleViewForumAsMessages</see> method; invoking this method will update the value of the <c>view_forum_as_messages</c> flag of <see cref="ChannelFull"/> or <see cref="Dialog"/> and emit an <see cref="UpdateChannelViewForumAsMessages"/>. <para>See <a href="https://corefork.telegram.org/constructor/updateChannelViewForumAsMessages"/></para></summary>
|
/// <summary>Users may also choose to display messages from all topics as if they were sent to a normal group, using a "View as messages" setting in the local client.<br/>This setting only affects the current account, and is synced to other logged in sessions using the <see cref="SchemaExtensions.Channels_ToggleViewForumAsMessages">Channels_ToggleViewForumAsMessages</see> method; invoking this method will update the value of the <c>view_forum_as_messages</c> flag of <see cref="ChannelFull"/> or <see cref="Dialog"/> and emit an <see cref="UpdateChannelViewForumAsMessages"/>. <para>See <a href="https://corefork.telegram.org/constructor/updateChannelViewForumAsMessages"/></para></summary>
|
||||||
[TLDef(0x07B68920, inheritBefore = true)]
|
[TLDef(0x07B68920, inheritBefore = true)]
|
||||||
|
|
@ -5872,6 +5897,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>Bots only: the number of reactions on a message with anonymous reactions has changed. <para>See <a href="https://corefork.telegram.org/constructor/updateBotMessageReactions"/></para></summary>
|
/// <summary>Bots only: the number of reactions on a message with anonymous reactions has changed. <para>See <a href="https://corefork.telegram.org/constructor/updateBotMessageReactions"/></para></summary>
|
||||||
[TLDef(0x09CB7759)]
|
[TLDef(0x09CB7759)]
|
||||||
|
|
@ -5889,6 +5915,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>A <a href="https://corefork.telegram.org/api/saved-messages">saved message dialog</a> was pinned/unpinned <para>See <a href="https://corefork.telegram.org/constructor/updateSavedDialogPinned"/></para></summary>
|
/// <summary>A <a href="https://corefork.telegram.org/api/saved-messages">saved message dialog</a> was pinned/unpinned <para>See <a href="https://corefork.telegram.org/constructor/updateSavedDialogPinned"/></para></summary>
|
||||||
[TLDef(0xAEAF9E74)]
|
[TLDef(0xAEAF9E74)]
|
||||||
|
|
@ -5975,6 +6002,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>A message was received via a <a href="https://corefork.telegram.org/api/bots/connected-business-bots">connected business chat »</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateBotNewBusinessMessage"/></para></summary>
|
/// <summary>A message was received via a <a href="https://corefork.telegram.org/api/bots/connected-business-bots">connected business chat »</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateBotNewBusinessMessage"/></para></summary>
|
||||||
[TLDef(0x9DDB347C)]
|
[TLDef(0x9DDB347C)]
|
||||||
|
|
@ -5998,6 +6026,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>A message was edited in a <a href="https://corefork.telegram.org/api/bots/connected-business-bots">connected business chat »</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateBotEditBusinessMessage"/></para></summary>
|
/// <summary>A message was edited in a <a href="https://corefork.telegram.org/api/bots/connected-business-bots">connected business chat »</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateBotEditBusinessMessage"/></para></summary>
|
||||||
[TLDef(0x07DF587C)]
|
[TLDef(0x07DF587C)]
|
||||||
|
|
@ -6021,6 +6050,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>A message was deleted in a <a href="https://corefork.telegram.org/api/bots/connected-business-bots">connected business chat »</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateBotDeleteBusinessMessage"/></para></summary>
|
/// <summary>A message was deleted in a <a href="https://corefork.telegram.org/api/bots/connected-business-bots">connected business chat »</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateBotDeleteBusinessMessage"/></para></summary>
|
||||||
[TLDef(0xA02A982E)]
|
[TLDef(0xA02A982E)]
|
||||||
|
|
@ -6036,6 +6066,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>Represents a new <a href="https://corefork.telegram.org/api/reactions#notifications-about-reactions">reaction to a story</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateNewStoryReaction"/></para></summary>
|
/// <summary>Represents a new <a href="https://corefork.telegram.org/api/reactions#notifications-about-reactions">reaction to a story</a>. <para>See <a href="https://corefork.telegram.org/constructor/updateNewStoryReaction"/></para></summary>
|
||||||
[TLDef(0x1824E40B)]
|
[TLDef(0x1824E40B)]
|
||||||
|
|
@ -6105,6 +6136,7 @@ namespace TL
|
||||||
public int qts;
|
public int qts;
|
||||||
|
|
||||||
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
public override (long, int, int) GetMBox() => (-1, qts, 1);
|
||||||
|
public override void SetPTS(int new_qts, int _) => qts = new_qts;
|
||||||
}
|
}
|
||||||
/// <summary>Contains the current <a href="https://corefork.telegram.org/api/reactions#paid-reactions">default paid reaction privacy, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/updatePaidReactionPrivacy"/></para></summary>
|
/// <summary>Contains the current <a href="https://corefork.telegram.org/api/reactions#paid-reactions">default paid reaction privacy, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/updatePaidReactionPrivacy"/></para></summary>
|
||||||
[TLDef(0x8B725FCE)]
|
[TLDef(0x8B725FCE)]
|
||||||
|
|
@ -6172,6 +6204,49 @@ namespace TL
|
||||||
exception = 0x1,
|
exception = 0x1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateGroupCallMessage"/></para></summary>
|
||||||
|
[TLDef(0x78C314E0)]
|
||||||
|
public sealed partial class UpdateGroupCallMessage : Update
|
||||||
|
{
|
||||||
|
public InputGroupCallBase call;
|
||||||
|
public Peer from_id;
|
||||||
|
public long random_id;
|
||||||
|
public TextWithEntities message;
|
||||||
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateGroupCallEncryptedMessage"/></para></summary>
|
||||||
|
[TLDef(0xC957A766)]
|
||||||
|
public sealed partial class UpdateGroupCallEncryptedMessage : Update
|
||||||
|
{
|
||||||
|
public InputGroupCallBase call;
|
||||||
|
public Peer from_id;
|
||||||
|
public byte[] encrypted_message;
|
||||||
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updatePinnedForumTopic"/></para></summary>
|
||||||
|
[TLDef(0x683B2C52)]
|
||||||
|
public sealed partial class UpdatePinnedForumTopic : Update
|
||||||
|
{
|
||||||
|
public Flags flags;
|
||||||
|
public Peer peer;
|
||||||
|
public int topic_id;
|
||||||
|
|
||||||
|
[Flags] public enum Flags : uint
|
||||||
|
{
|
||||||
|
pinned = 0x1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updatePinnedForumTopics"/></para></summary>
|
||||||
|
[TLDef(0xDEF143D0)]
|
||||||
|
public sealed partial class UpdatePinnedForumTopics : Update
|
||||||
|
{
|
||||||
|
public Flags flags;
|
||||||
|
public Peer peer;
|
||||||
|
[IfFlag(0)] public int[] order;
|
||||||
|
|
||||||
|
[Flags] public enum Flags : uint
|
||||||
|
{
|
||||||
|
has_order = 0x1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Updates state. <para>See <a href="https://corefork.telegram.org/constructor/updates.state"/></para></summary>
|
/// <summary>Updates state. <para>See <a href="https://corefork.telegram.org/constructor/updates.state"/></para></summary>
|
||||||
[TLDef(0xA56C2A3E)]
|
[TLDef(0xA56C2A3E)]
|
||||||
|
|
@ -7270,6 +7345,13 @@ namespace TL
|
||||||
/// <summary>Emoji</summary>
|
/// <summary>Emoji</summary>
|
||||||
public string emoticon;
|
public string emoticon;
|
||||||
}
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/sendMessageTextDraftAction"/></para></summary>
|
||||||
|
[TLDef(0x376D975C)]
|
||||||
|
public sealed partial class SendMessageTextDraftAction : SendMessageAction
|
||||||
|
{
|
||||||
|
public long random_id;
|
||||||
|
public TextWithEntities text;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Users found by name substring and auxiliary data. <para>See <a href="https://corefork.telegram.org/constructor/contacts.found"/></para></summary>
|
/// <summary>Users found by name substring and auxiliary data. <para>See <a href="https://corefork.telegram.org/constructor/contacts.found"/></para></summary>
|
||||||
[TLDef(0xB3134D9D)]
|
[TLDef(0xB3134D9D)]
|
||||||
|
|
@ -12436,9 +12518,9 @@ namespace TL
|
||||||
public partial class ChannelAdminLogEventActionChangePeerColor : ChannelAdminLogEventAction
|
public partial class ChannelAdminLogEventActionChangePeerColor : ChannelAdminLogEventAction
|
||||||
{
|
{
|
||||||
/// <summary>Previous accent palette</summary>
|
/// <summary>Previous accent palette</summary>
|
||||||
public PeerColor prev_value;
|
public PeerColorBase prev_value;
|
||||||
/// <summary>New accent palette</summary>
|
/// <summary>New accent palette</summary>
|
||||||
public PeerColor new_value;
|
public PeerColorBase new_value;
|
||||||
}
|
}
|
||||||
/// <summary>The <a href="https://corefork.telegram.org/api/colors">profile accent color</a> was changed <para>See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionChangeProfilePeerColor"/></para></summary>
|
/// <summary>The <a href="https://corefork.telegram.org/api/colors">profile accent color</a> was changed <para>See <a href="https://corefork.telegram.org/constructor/channelAdminLogEventActionChangeProfilePeerColor"/></para></summary>
|
||||||
[TLDef(0x5E477B25)]
|
[TLDef(0x5E477B25)]
|
||||||
|
|
@ -15253,6 +15335,9 @@ namespace TL
|
||||||
creator = 0x8000,
|
creator = 0x8000,
|
||||||
/// <summary>Field <see cref="invite_link"/> has a value</summary>
|
/// <summary>Field <see cref="invite_link"/> has a value</summary>
|
||||||
has_invite_link = 0x10000,
|
has_invite_link = 0x10000,
|
||||||
|
messages_enabled = 0x20000,
|
||||||
|
can_change_messages_enabled = 0x40000,
|
||||||
|
min = 0x80000,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Group call ID</summary>
|
/// <summary>Group call ID</summary>
|
||||||
|
|
@ -15694,7 +15779,7 @@ namespace TL
|
||||||
|
|
||||||
/// <summary>Available <a href="https://corefork.telegram.org/api/themes#chat-themes">chat themes</a> <para>See <a href="https://corefork.telegram.org/constructor/account.chatThemes"/></para></summary>
|
/// <summary>Available <a href="https://corefork.telegram.org/api/themes#chat-themes">chat themes</a> <para>See <a href="https://corefork.telegram.org/constructor/account.chatThemes"/></para></summary>
|
||||||
/// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/account.chatThemesNotModified">account.chatThemesNotModified</a></remarks>
|
/// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/account.chatThemesNotModified">account.chatThemesNotModified</a></remarks>
|
||||||
[TLDef(0x16484857)]
|
[TLDef(0xBE098173)]
|
||||||
public sealed partial class Account_ChatThemes : IObject, IPeerResolver
|
public sealed partial class Account_ChatThemes : IObject, IPeerResolver
|
||||||
{
|
{
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||||
|
|
@ -15708,7 +15793,7 @@ namespace TL
|
||||||
/// <summary>Users mentioned in the <c>themes</c> field.</summary>
|
/// <summary>Users mentioned in the <c>themes</c> field.</summary>
|
||||||
public Dictionary<long, User> users;
|
public Dictionary<long, User> users;
|
||||||
/// <summary>Next offset for pagination.</summary>
|
/// <summary>Next offset for pagination.</summary>
|
||||||
[IfFlag(0)] public int next_offset;
|
[IfFlag(0)] public string next_offset;
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
[Flags] public enum Flags : uint
|
||||||
{
|
{
|
||||||
|
|
@ -15740,7 +15825,7 @@ namespace TL
|
||||||
/// <summary>If set, contains some media.</summary>
|
/// <summary>If set, contains some media.</summary>
|
||||||
[IfFlag(14)] public MessageMedia media;
|
[IfFlag(14)] public MessageMedia media;
|
||||||
/// <summary>If set, the sponsored message should use the <a href="https://corefork.telegram.org/api/colors">message accent color »</a> specified in <c>color</c>.</summary>
|
/// <summary>If set, the sponsored message should use the <a href="https://corefork.telegram.org/api/colors">message accent color »</a> specified in <c>color</c>.</summary>
|
||||||
[IfFlag(13)] public PeerColor color;
|
[IfFlag(13)] public PeerColorBase color;
|
||||||
/// <summary>Label of the sponsored message button.</summary>
|
/// <summary>Label of the sponsored message button.</summary>
|
||||||
public string button_text;
|
public string button_text;
|
||||||
/// <summary>If set, contains additional information about the sponsor to be shown along with the message.</summary>
|
/// <summary>If set, contains additional information about the sponsor to be shown along with the message.</summary>
|
||||||
|
|
@ -16456,6 +16541,18 @@ namespace TL
|
||||||
/// <summary>The upgrade hash from <see cref="MessageActionStarGift"/>.<c>prepaid_upgrade_hash</c> or <see cref="SavedStarGift"/>.<c>prepaid_upgrade_hash</c>.</summary>
|
/// <summary>The upgrade hash from <see cref="MessageActionStarGift"/>.<c>prepaid_upgrade_hash</c> or <see cref="SavedStarGift"/>.<c>prepaid_upgrade_hash</c>.</summary>
|
||||||
public string hash;
|
public string hash;
|
||||||
}
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputInvoicePremiumAuthCode"/></para></summary>
|
||||||
|
[TLDef(0x3E77F614)]
|
||||||
|
public sealed partial class InputInvoicePremiumAuthCode : InputInvoice
|
||||||
|
{
|
||||||
|
public InputStorePaymentPurpose purpose;
|
||||||
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputInvoiceStarGiftDropOriginalDetails"/></para></summary>
|
||||||
|
[TLDef(0x0923D8D1)]
|
||||||
|
public sealed partial class InputInvoiceStarGiftDropOriginalDetails : InputInvoice
|
||||||
|
{
|
||||||
|
public InputSavedStarGift stargift;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Exported <a href="https://corefork.telegram.org/api/links#invoice-links">invoice deep link</a> <para>See <a href="https://corefork.telegram.org/constructor/payments.exportedInvoice"/></para></summary>
|
/// <summary>Exported <a href="https://corefork.telegram.org/api/links#invoice-links">invoice deep link</a> <para>See <a href="https://corefork.telegram.org/constructor/payments.exportedInvoice"/></para></summary>
|
||||||
[TLDef(0xAED0CBD9)]
|
[TLDef(0xAED0CBD9)]
|
||||||
|
|
@ -17040,7 +17137,7 @@ namespace TL
|
||||||
public override int ID => id;
|
public override int ID => id;
|
||||||
}
|
}
|
||||||
/// <summary>Represents a <a href="https://corefork.telegram.org/api/forum#forum-topics">forum topic</a>. <para>See <a href="https://corefork.telegram.org/constructor/forumTopic"/></para></summary>
|
/// <summary>Represents a <a href="https://corefork.telegram.org/api/forum#forum-topics">forum topic</a>. <para>See <a href="https://corefork.telegram.org/constructor/forumTopic"/></para></summary>
|
||||||
[TLDef(0x71701DA9)]
|
[TLDef(0xCDFF0ECA)]
|
||||||
public sealed partial class ForumTopic : ForumTopicBase
|
public sealed partial class ForumTopic : ForumTopicBase
|
||||||
{
|
{
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||||
|
|
@ -17049,6 +17146,7 @@ namespace TL
|
||||||
public int id;
|
public int id;
|
||||||
/// <summary>Topic creation date</summary>
|
/// <summary>Topic creation date</summary>
|
||||||
public DateTime date;
|
public DateTime date;
|
||||||
|
public Peer peer;
|
||||||
/// <summary>Topic title</summary>
|
/// <summary>Topic title</summary>
|
||||||
public string title;
|
public string title;
|
||||||
/// <summary>If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of <c>0x6FB9F0</c>, <c>0xFFD67E</c>, <c>0xCB86DB</c>, <c>0x8EEE98</c>, <c>0xFF93B2</c>, or <c>0xFB6F5F</c>.</summary>
|
/// <summary>If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of <c>0x6FB9F0</c>, <c>0xFFD67E</c>, <c>0xCB86DB</c>, <c>0x8EEE98</c>, <c>0xFF93B2</c>, or <c>0xFB6F5F</c>.</summary>
|
||||||
|
|
@ -17090,6 +17188,7 @@ namespace TL
|
||||||
short_ = 0x20,
|
short_ = 0x20,
|
||||||
/// <summary>Whether the topic is hidden (only valid for the "General" topic, <c>id=1</c>)</summary>
|
/// <summary>Whether the topic is hidden (only valid for the "General" topic, <c>id=1</c>)</summary>
|
||||||
hidden = 0x40,
|
hidden = 0x40,
|
||||||
|
title_missing = 0x80,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary><a href="https://corefork.telegram.org/api/forum#forum-topics">Topic ID</a></summary>
|
/// <summary><a href="https://corefork.telegram.org/api/forum#forum-topics">Topic ID</a></summary>
|
||||||
|
|
@ -18709,9 +18808,11 @@ namespace TL
|
||||||
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
|
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>Represents a <a href="https://corefork.telegram.org/api/colors">color palette »</a>. <para>See <a href="https://corefork.telegram.org/type/PeerColor"/></para> <para>Derived classes: <see cref="PeerColor"/></para></summary>
|
||||||
|
public abstract partial class PeerColorBase : IObject { }
|
||||||
/// <summary>Represents a <a href="https://corefork.telegram.org/api/colors">color palette »</a>. <para>See <a href="https://corefork.telegram.org/constructor/peerColor"/></para></summary>
|
/// <summary>Represents a <a href="https://corefork.telegram.org/api/colors">color palette »</a>. <para>See <a href="https://corefork.telegram.org/constructor/peerColor"/></para></summary>
|
||||||
[TLDef(0xB54B5ACF)]
|
[TLDef(0xB54B5ACF)]
|
||||||
public sealed partial class PeerColor : IObject
|
public sealed partial class PeerColor : PeerColorBase
|
||||||
{
|
{
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||||
public Flags flags;
|
public Flags flags;
|
||||||
|
|
@ -18728,6 +18829,31 @@ namespace TL
|
||||||
has_background_emoji_id = 0x2,
|
has_background_emoji_id = 0x2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/peerColorCollectible"/></para></summary>
|
||||||
|
[TLDef(0xB9C0639A)]
|
||||||
|
public sealed partial class PeerColorCollectible : PeerColorBase
|
||||||
|
{
|
||||||
|
public Flags flags;
|
||||||
|
public long collectible_id;
|
||||||
|
public long gift_emoji_id;
|
||||||
|
public long background_emoji_id;
|
||||||
|
public int accent_color;
|
||||||
|
public int[] colors;
|
||||||
|
[IfFlag(0)] public int dark_accent_color;
|
||||||
|
[IfFlag(1)] public int[] dark_colors;
|
||||||
|
|
||||||
|
[Flags] public enum Flags : uint
|
||||||
|
{
|
||||||
|
has_dark_accent_color = 0x1,
|
||||||
|
has_dark_colors = 0x2,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/inputPeerColorCollectible"/></para></summary>
|
||||||
|
[TLDef(0xB8EA86A9)]
|
||||||
|
public sealed partial class InputPeerColorCollectible : PeerColorBase
|
||||||
|
{
|
||||||
|
public long collectible_id;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>Contains info about a <a href="https://corefork.telegram.org/api/colors">color palette »</a>. <para>See <a href="https://corefork.telegram.org/type/help.PeerColorSet"/></para> <para>Derived classes: <see cref="Help_PeerColorSet"/>, <see cref="Help_PeerColorProfileSet"/></para></summary>
|
/// <summary>Contains info about a <a href="https://corefork.telegram.org/api/colors">color palette »</a>. <para>See <a href="https://corefork.telegram.org/type/help.PeerColorSet"/></para> <para>Derived classes: <see cref="Help_PeerColorSet"/>, <see cref="Help_PeerColorProfileSet"/></para></summary>
|
||||||
public abstract partial class Help_PeerColorSetBase : IObject { }
|
public abstract partial class Help_PeerColorSetBase : IObject { }
|
||||||
|
|
@ -20044,6 +20170,7 @@ namespace TL
|
||||||
posts_search = 0x1000000,
|
posts_search = 0x1000000,
|
||||||
/// <summary>Represents payment for a <a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">separate prepaid upgrade of a gift</a>.</summary>
|
/// <summary>Represents payment for a <a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">separate prepaid upgrade of a gift</a>.</summary>
|
||||||
stargift_prepaid_upgrade = 0x2000000,
|
stargift_prepaid_upgrade = 0x2000000,
|
||||||
|
stargift_drop_original_details = 0x4000000,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -20488,6 +20615,7 @@ namespace TL
|
||||||
limited_per_user = 0x100,
|
limited_per_user = 0x100,
|
||||||
/// <summary>Field <see cref="locked_until_date"/> has a value</summary>
|
/// <summary>Field <see cref="locked_until_date"/> has a value</summary>
|
||||||
has_locked_until_date = 0x200,
|
has_locked_until_date = 0x200,
|
||||||
|
peer_color_available = 0x400,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Identifier of the gift</summary>
|
/// <summary>Identifier of the gift</summary>
|
||||||
|
|
@ -20500,7 +20628,7 @@ namespace TL
|
||||||
public override Peer ReleasedBy => released_by;
|
public override Peer ReleasedBy => released_by;
|
||||||
}
|
}
|
||||||
/// <summary>Represents a <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible star gift, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/starGiftUnique"/></para></summary>
|
/// <summary>Represents a <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible star gift, see here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/starGiftUnique"/></para></summary>
|
||||||
[TLDef(0x1BEFE865)]
|
[TLDef(0xB0BF741B)]
|
||||||
public sealed partial class StarGiftUnique : StarGiftBase
|
public sealed partial class StarGiftUnique : StarGiftBase
|
||||||
{
|
{
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||||
|
|
@ -20539,6 +20667,8 @@ namespace TL
|
||||||
[IfFlag(8)] public string value_currency;
|
[IfFlag(8)] public string value_currency;
|
||||||
/// <summary>The current chat where the associated <a href="https://corefork.telegram.org/api/themes#chat-themes">chat theme</a> is installed, if any (gift-based themes can only be installed in one chat at a time).</summary>
|
/// <summary>The current chat where the associated <a href="https://corefork.telegram.org/api/themes#chat-themes">chat theme</a> is installed, if any (gift-based themes can only be installed in one chat at a time).</summary>
|
||||||
[IfFlag(10)] public Peer theme_peer;
|
[IfFlag(10)] public Peer theme_peer;
|
||||||
|
[IfFlag(11)] public PeerColorBase peer_color;
|
||||||
|
[IfFlag(12)] public Peer host_id;
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
[Flags] public enum Flags : uint
|
||||||
{
|
{
|
||||||
|
|
@ -20564,6 +20694,10 @@ namespace TL
|
||||||
theme_available = 0x200,
|
theme_available = 0x200,
|
||||||
/// <summary>Field <see cref="theme_peer"/> has a value</summary>
|
/// <summary>Field <see cref="theme_peer"/> has a value</summary>
|
||||||
has_theme_peer = 0x400,
|
has_theme_peer = 0x400,
|
||||||
|
/// <summary>Field <see cref="peer_color"/> has a value</summary>
|
||||||
|
has_peer_color = 0x800,
|
||||||
|
/// <summary>Field <see cref="host_id"/> has a value</summary>
|
||||||
|
has_host_id = 0x1000,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Identifier of the collectible gift.</summary>
|
/// <summary>Identifier of the collectible gift.</summary>
|
||||||
|
|
@ -20951,11 +21085,13 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>A preview of the possible attributes (chosen randomly) a <a href="https://corefork.telegram.org/api/gifts">gift »</a> can receive after upgrading it to a <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible gift »</a>, see <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/payments.starGiftUpgradePreview"/></para></summary>
|
/// <summary>A preview of the possible attributes (chosen randomly) a <a href="https://corefork.telegram.org/api/gifts">gift »</a> can receive after upgrading it to a <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible gift »</a>, see <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">here »</a> for more info. <para>See <a href="https://corefork.telegram.org/constructor/payments.starGiftUpgradePreview"/></para></summary>
|
||||||
[TLDef(0x167BD90B)]
|
[TLDef(0x3DE1DFED)]
|
||||||
public sealed partial class Payments_StarGiftUpgradePreview : IObject
|
public sealed partial class Payments_StarGiftUpgradePreview : IObject
|
||||||
{
|
{
|
||||||
/// <summary>Possible gift attributes</summary>
|
/// <summary>Possible gift attributes</summary>
|
||||||
public StarGiftAttribute[] sample_attributes;
|
public StarGiftAttribute[] sample_attributes;
|
||||||
|
public StarGiftUpgradePrice[] prices;
|
||||||
|
public StarGiftUpgradePrice[] next_prices;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Describes a list of users (or bots). <para>See <a href="https://corefork.telegram.org/constructor/users.users"/></para></summary>
|
/// <summary>Describes a list of users (or bots). <para>See <a href="https://corefork.telegram.org/constructor/users.users"/></para></summary>
|
||||||
|
|
@ -21002,7 +21138,7 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Represents a <a href="https://corefork.telegram.org/api/gifts">gift</a> owned by a peer. <para>See <a href="https://corefork.telegram.org/constructor/savedStarGift"/></para></summary>
|
/// <summary>Represents a <a href="https://corefork.telegram.org/api/gifts">gift</a> owned by a peer. <para>See <a href="https://corefork.telegram.org/constructor/savedStarGift"/></para></summary>
|
||||||
[TLDef(0x19A9B572)]
|
[TLDef(0x8983A452)]
|
||||||
public sealed partial class SavedStarGift : IObject
|
public sealed partial class SavedStarGift : IObject
|
||||||
{
|
{
|
||||||
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
/// <summary>Extra bits of information, use <c>flags.HasFlag(...)</c> to test for those</summary>
|
||||||
|
|
@ -21035,6 +21171,7 @@ namespace TL
|
||||||
[IfFlag(15)] public int[] collection_id;
|
[IfFlag(15)] public int[] collection_id;
|
||||||
/// <summary><a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">Hash to prepay for a gift upgrade separately »</a>.</summary>
|
/// <summary><a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">Hash to prepay for a gift upgrade separately »</a>.</summary>
|
||||||
[IfFlag(16)] public string prepaid_upgrade_hash;
|
[IfFlag(16)] public string prepaid_upgrade_hash;
|
||||||
|
[IfFlag(18)] public long drop_original_details_stars;
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
[Flags] public enum Flags : uint
|
||||||
{
|
{
|
||||||
|
|
@ -21074,6 +21211,8 @@ namespace TL
|
||||||
has_prepaid_upgrade_hash = 0x10000,
|
has_prepaid_upgrade_hash = 0x10000,
|
||||||
/// <summary>If set, someone already <a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">separately pre-paid</a> for the upgrade of this gift.</summary>
|
/// <summary>If set, someone already <a href="https://corefork.telegram.org/api/gifts#prepaying-for-someone-elses-upgrade">separately pre-paid</a> for the upgrade of this gift.</summary>
|
||||||
upgrade_separate = 0x20000,
|
upgrade_separate = 0x20000,
|
||||||
|
/// <summary>Field <see cref="drop_original_details_stars"/> has a value</summary>
|
||||||
|
has_drop_original_details_stars = 0x40000,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -21322,12 +21461,13 @@ namespace TL
|
||||||
public StarGiftBase[] gifts;
|
public StarGiftBase[] gifts;
|
||||||
/// <summary>Offset for pagination, pass this to <see cref="SchemaExtensions.Payments_GetResaleStarGifts">Payments_GetResaleStarGifts</see>.<c>offset</c> to fetch the next results.</summary>
|
/// <summary>Offset for pagination, pass this to <see cref="SchemaExtensions.Payments_GetResaleStarGifts">Payments_GetResaleStarGifts</see>.<c>offset</c> to fetch the next results.</summary>
|
||||||
[IfFlag(0)] public string next_offset;
|
[IfFlag(0)] public string next_offset;
|
||||||
/// <summary>Possible gift attributes.</summary>
|
/// <summary>Possible gift attributes, only set if <see cref="SchemaExtensions.Payments_GetResaleStarGifts">Payments_GetResaleStarGifts</see>.<c>attributes_hash</c> is set (on the first call, it must be equal to <c>0</c>).</summary>
|
||||||
[IfFlag(1)] public StarGiftAttribute[] attributes;
|
[IfFlag(1)] public StarGiftAttribute[] attributes;
|
||||||
/// <summary>Hash of the <c>attributes</c> field, pass this to <see cref="SchemaExtensions.Payments_GetResaleStarGifts">Payments_GetResaleStarGifts</see>.<c>attributes_hash</c> to avoid returning any attributes (flag not set) if they haven't changed.</summary>
|
/// <summary>Hash of the <c>attributes</c> field, pass this to <see cref="SchemaExtensions.Payments_GetResaleStarGifts">Payments_GetResaleStarGifts</see>.<c>attributes_hash</c> to avoid returning any attributes (flag not set) if they haven't changed.</summary>
|
||||||
[IfFlag(1)] public long attributes_hash;
|
[IfFlag(1)] public long attributes_hash;
|
||||||
/// <summary>Chats mentioned in the attributes.</summary>
|
/// <summary>Chats mentioned in the attributes.</summary>
|
||||||
public Dictionary<long, ChatBase> chats;
|
public Dictionary<long, ChatBase> chats;
|
||||||
|
/// <summary>Indicates the total number of gifts that have a specific attribute, only set if <see cref="SchemaExtensions.Payments_GetResaleStarGifts">Payments_GetResaleStarGifts</see>.<c>offset</c> is empty (since this field is not related to the current result page but to all of them, it's only returned on the first page).</summary>
|
||||||
[IfFlag(2)] public StarGiftAttributeCounter[] counters;
|
[IfFlag(2)] public StarGiftAttributeCounter[] counters;
|
||||||
/// <summary>Users mentioned in the attributes.</summary>
|
/// <summary>Users mentioned in the attributes.</summary>
|
||||||
public Dictionary<long, User> users;
|
public Dictionary<long, User> users;
|
||||||
|
|
@ -21676,4 +21816,12 @@ namespace TL
|
||||||
/// <summary>The slug from <see cref="StarGiftUnique"/>.<c>slug</c>.</summary>
|
/// <summary>The slug from <see cref="StarGiftUnique"/>.<c>slug</c>.</summary>
|
||||||
public string slug;
|
public string slug;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/starGiftUpgradePrice"/></para></summary>
|
||||||
|
[TLDef(0x99EA331D)]
|
||||||
|
public sealed partial class StarGiftUpgradePrice : IObject
|
||||||
|
{
|
||||||
|
public DateTime date;
|
||||||
|
public long upgrade_stars;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -387,6 +387,15 @@ namespace TL
|
||||||
mnc = mnc,
|
mnc = mnc,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/method/auth.checkPaidAuth"/></para></summary>
|
||||||
|
public static Task<Auth_SentCodeBase> Auth_CheckPaidAuth(this Client client, string phone_number, string phone_code_hash, long form_id)
|
||||||
|
=> client.Invoke(new Auth_CheckPaidAuth
|
||||||
|
{
|
||||||
|
phone_number = phone_number,
|
||||||
|
phone_code_hash = phone_code_hash,
|
||||||
|
form_id = form_id,
|
||||||
|
});
|
||||||
|
|
||||||
/// <summary>Register device to receive <a href="https://corefork.telegram.org/api/push-updates">PUSH notifications</a> <para>See <a href="https://corefork.telegram.org/method/account.registerDevice"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/account.registerDevice#possible-errors">details</a>)</para></summary>
|
/// <summary>Register device to receive <a href="https://corefork.telegram.org/api/push-updates">PUSH notifications</a> <para>See <a href="https://corefork.telegram.org/method/account.registerDevice"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/account.registerDevice#possible-errors">details</a>)</para></summary>
|
||||||
/// <param name="no_muted">Avoid receiving (silent and invisible background) notifications. Useful to save battery.</param>
|
/// <param name="no_muted">Avoid receiving (silent and invisible background) notifications. Useful to save battery.</param>
|
||||||
/// <param name="token_type">Device token type, see <a href="https://corefork.telegram.org/api/push-updates#subscribing-to-notifications">PUSH updates</a> for the possible values.</param>
|
/// <param name="token_type">Device token type, see <a href="https://corefork.telegram.org/api/push-updates#subscribing-to-notifications">PUSH updates</a> for the possible values.</param>
|
||||||
|
|
@ -1220,13 +1229,11 @@ namespace TL
|
||||||
/// <summary>Update the <a href="https://corefork.telegram.org/api/colors">accent color and background custom emoji »</a> of the current account. <para>See <a href="https://corefork.telegram.org/method/account.updateColor"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/account.updateColor#possible-errors">details</a>)</para></summary>
|
/// <summary>Update the <a href="https://corefork.telegram.org/api/colors">accent color and background custom emoji »</a> of the current account. <para>See <a href="https://corefork.telegram.org/method/account.updateColor"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/account.updateColor#possible-errors">details</a>)</para></summary>
|
||||||
/// <param name="for_profile">Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed.</param>
|
/// <param name="for_profile">Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed.</param>
|
||||||
/// <param name="color"><a href="https://corefork.telegram.org/api/colors">ID of the accent color palette »</a> to use (not RGB24, see <a href="https://corefork.telegram.org/api/colors">here »</a> for more info).</param>
|
/// <param name="color"><a href="https://corefork.telegram.org/api/colors">ID of the accent color palette »</a> to use (not RGB24, see <a href="https://corefork.telegram.org/api/colors">here »</a> for more info).</param>
|
||||||
/// <param name="background_emoji_id">Custom emoji ID used in the accent color pattern.</param>
|
public static Task<bool> Account_UpdateColor(this Client client, PeerColorBase color = null, bool for_profile = false)
|
||||||
public static Task<bool> Account_UpdateColor(this Client client, long? background_emoji_id = null, int? color = null, bool for_profile = false)
|
|
||||||
=> client.Invoke(new Account_UpdateColor
|
=> client.Invoke(new Account_UpdateColor
|
||||||
{
|
{
|
||||||
flags = (Account_UpdateColor.Flags)((background_emoji_id != null ? 0x1 : 0) | (color != null ? 0x4 : 0) | (for_profile ? 0x2 : 0)),
|
flags = (Account_UpdateColor.Flags)((color != null ? 0x4 : 0) | (for_profile ? 0x2 : 0)),
|
||||||
color = color ?? default,
|
color = color,
|
||||||
background_emoji_id = background_emoji_id ?? default,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/// <summary>Get a set of suggested <a href="https://corefork.telegram.org/api/custom-emoji">custom emoji stickers</a> that can be used in an <a href="https://corefork.telegram.org/api/colors">accent color pattern</a>. <para>See <a href="https://corefork.telegram.org/method/account.getDefaultBackgroundEmojis"/></para></summary>
|
/// <summary>Get a set of suggested <a href="https://corefork.telegram.org/api/custom-emoji">custom emoji stickers</a> that can be used in an <a href="https://corefork.telegram.org/api/colors">accent color pattern</a>. <para>See <a href="https://corefork.telegram.org/method/account.getDefaultBackgroundEmojis"/></para></summary>
|
||||||
|
|
@ -1495,7 +1502,7 @@ namespace TL
|
||||||
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a></param>
|
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a></param>
|
||||||
/// <param name="hash">Hash from a previously returned <see cref="Account_ChatThemes"/>, to avoid returning any result if the theme list hasn't changed.</param>
|
/// <param name="hash">Hash from a previously returned <see cref="Account_ChatThemes"/>, to avoid returning any result if the theme list hasn't changed.</param>
|
||||||
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/account.chatThemesNotModified">account.chatThemesNotModified</a></returns>
|
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/account.chatThemesNotModified">account.chatThemesNotModified</a></returns>
|
||||||
public static Task<Account_ChatThemes> Account_GetUniqueGiftChatThemes(this Client client, int offset = default, int limit = int.MaxValue, long hash = default)
|
public static Task<Account_ChatThemes> Account_GetUniqueGiftChatThemes(this Client client, string offset, int limit = int.MaxValue, long hash = default)
|
||||||
=> client.Invoke(new Account_GetUniqueGiftChatThemes
|
=> client.Invoke(new Account_GetUniqueGiftChatThemes
|
||||||
{
|
{
|
||||||
offset = offset,
|
offset = offset,
|
||||||
|
|
@ -1561,6 +1568,14 @@ namespace TL
|
||||||
documents = documents,
|
documents = documents,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/method/users.suggestBirthday"/></para></summary>
|
||||||
|
public static Task<UpdatesBase> Users_SuggestBirthday(this Client client, InputUserBase id, Birthday birthday)
|
||||||
|
=> client.Invoke(new Users_SuggestBirthday
|
||||||
|
{
|
||||||
|
id = id,
|
||||||
|
birthday = birthday,
|
||||||
|
});
|
||||||
|
|
||||||
/// <summary>Get the telegram IDs of all contacts.<br/>Returns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings). <para>See <a href="https://corefork.telegram.org/method/contacts.getContactIDs"/></para></summary>
|
/// <summary>Get the telegram IDs of all contacts.<br/>Returns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings). <para>See <a href="https://corefork.telegram.org/method/contacts.getContactIDs"/></para></summary>
|
||||||
/// <param name="hash"><a href="https://corefork.telegram.org/api/offsets#hash-generation">Hash used for caching, for more info click here</a></param>
|
/// <param name="hash"><a href="https://corefork.telegram.org/api/offsets#hash-generation">Hash used for caching, for more info click here</a></param>
|
||||||
public static Task<int[]> Contacts_GetContactIDs(this Client client, long hash = default)
|
public static Task<int[]> Contacts_GetContactIDs(this Client client, long hash = default)
|
||||||
|
|
@ -1720,14 +1735,15 @@ namespace TL
|
||||||
/// <param name="first_name">First name</param>
|
/// <param name="first_name">First name</param>
|
||||||
/// <param name="last_name">Last name</param>
|
/// <param name="last_name">Last name</param>
|
||||||
/// <param name="phone">User's phone number, may be omitted to simply add the user to the contact list, without a phone number.</param>
|
/// <param name="phone">User's phone number, may be omitted to simply add the user to the contact list, without a phone number.</param>
|
||||||
public static Task<UpdatesBase> Contacts_AddContact(this Client client, InputUserBase id, string first_name, string last_name, string phone, bool add_phone_privacy_exception = false)
|
public static Task<UpdatesBase> Contacts_AddContact(this Client client, InputUserBase id, string first_name, string last_name, string phone, TextWithEntities note = null, bool add_phone_privacy_exception = false)
|
||||||
=> client.Invoke(new Contacts_AddContact
|
=> client.Invoke(new Contacts_AddContact
|
||||||
{
|
{
|
||||||
flags = (Contacts_AddContact.Flags)(add_phone_privacy_exception ? 0x1 : 0),
|
flags = (Contacts_AddContact.Flags)((note != null ? 0x2 : 0) | (add_phone_privacy_exception ? 0x1 : 0)),
|
||||||
id = id,
|
id = id,
|
||||||
first_name = first_name,
|
first_name = first_name,
|
||||||
last_name = last_name,
|
last_name = last_name,
|
||||||
phone = phone,
|
phone = phone,
|
||||||
|
note = note,
|
||||||
});
|
});
|
||||||
|
|
||||||
/// <summary>If the <a href="https://corefork.telegram.org/api/action-bar#add-contact">add contact action bar is active</a>, add that user as contact <para>See <a href="https://corefork.telegram.org/method/contacts.acceptContact"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/contacts.acceptContact#possible-errors">details</a>)</para></summary>
|
/// <summary>If the <a href="https://corefork.telegram.org/api/action-bar#add-contact">add contact action bar is active</a>, add that user as contact <para>See <a href="https://corefork.telegram.org/method/contacts.acceptContact"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/contacts.acceptContact#possible-errors">details</a>)</para></summary>
|
||||||
|
|
@ -1819,6 +1835,14 @@ namespace TL
|
||||||
q = q,
|
q = q,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/method/contacts.updateContactNote"/></para></summary>
|
||||||
|
public static Task<bool> Contacts_UpdateContactNote(this Client client, InputUserBase id, TextWithEntities note)
|
||||||
|
=> client.Invoke(new Contacts_UpdateContactNote
|
||||||
|
{
|
||||||
|
id = id,
|
||||||
|
note = note,
|
||||||
|
});
|
||||||
|
|
||||||
/// <summary><para>⚠ <b>This method is only for basic Chat</b>. See <see href="https://wiz0u.github.io/WTelegramClient/#terminology">Terminology</see> in the README to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Returns the list of messages by their IDs. <para>See <a href="https://corefork.telegram.org/method/messages.getMessages"/> [bots: ✓]</para></summary>
|
/// <summary><para>⚠ <b>This method is only for basic Chat</b>. See <see href="https://wiz0u.github.io/WTelegramClient/#terminology">Terminology</see> in the README to understand what this means<br/>Search for a similar method name starting with <c>Channels_</c> if you're dealing with a <see cref="Channel"/></para> Returns the list of messages by their IDs. <para>See <a href="https://corefork.telegram.org/method/messages.getMessages"/> [bots: ✓]</para></summary>
|
||||||
/// <param name="id">Message ID list</param>
|
/// <param name="id">Message ID list</param>
|
||||||
public static Task<Messages_MessagesBase> Messages_GetMessages(this Client client, params InputMessage[] id)
|
public static Task<Messages_MessagesBase> Messages_GetMessages(this Client client, params InputMessage[] id)
|
||||||
|
|
@ -4490,7 +4514,7 @@ namespace TL
|
||||||
/// <param name="peer">The channel</param>
|
/// <param name="peer">The channel</param>
|
||||||
/// <param name="msg_id">The message to react to</param>
|
/// <param name="msg_id">The message to react to</param>
|
||||||
/// <param name="count">The number of <a href="https://corefork.telegram.org/api/stars">stars</a> to send (each will increment the reaction counter by one).</param>
|
/// <param name="count">The number of <a href="https://corefork.telegram.org/api/stars">stars</a> to send (each will increment the reaction counter by one).</param>
|
||||||
/// <param name="random_id">Unique client message ID required to prevent message resending. <br/><strong>Note</strong>: this argument <strong>must</strong> be composed of a 64-bit integer where the first 32 bits are random, and the remaining 32 bits <strong>are equal to the current unixtime</strong>, i.e. <c>uint64_t random_id = (time() << 32) | ((uint64_t)random_uint32_t())</c>: this differs from the <c>random_id</c> format of all other methods in the API, which just take 64 random bits. <para>You can use <see cref="WTelegram.Helpers.RandomLong"/></para></param>
|
/// <param name="random_id">Unique client message ID required to prevent message resending. <br/><strong>Note</strong>: this argument <strong>must</strong> be composed of a 64-bit integer where the lower 32 bits are random, and the higher 32 bits <strong>are equal to the current unixtime</strong>, i.e. <c>uint64_t random_id = (time() << 32) | ((uint64_t)random_uint32_t())</c>: this differs from the <c>random_id</c> format of all other methods in the API, which just take 64 random bits. <para>You can use <see cref="WTelegram.Helpers.RandomLong"/></para></param>
|
||||||
/// <param name="private_">Each post with star reactions has a leaderboard with the top senders, but users can opt out of appearing there if they prefer more privacy. Not populating this field will use the default reaction privacy, stored on the server and synced to clients using <see cref="UpdatePaidReactionPrivacy"/> (see <a href="https://corefork.telegram.org/api/reactions#paid-reaction-privacy">here</a> for more info).</param>
|
/// <param name="private_">Each post with star reactions has a leaderboard with the top senders, but users can opt out of appearing there if they prefer more privacy. Not populating this field will use the default reaction privacy, stored on the server and synced to clients using <see cref="UpdatePaidReactionPrivacy"/> (see <a href="https://corefork.telegram.org/api/reactions#paid-reaction-privacy">here</a> for more info).</param>
|
||||||
public static Task<UpdatesBase> Messages_SendPaidReaction(this Client client, InputPeer peer, int msg_id, int count, long random_id, PaidReactionPrivacy private_ = null)
|
public static Task<UpdatesBase> Messages_SendPaidReaction(this Client client, InputPeer peer, int msg_id, int count, long random_id, PaidReactionPrivacy private_ = null)
|
||||||
=> client.Invoke(new Messages_SendPaidReaction
|
=> client.Invoke(new Messages_SendPaidReaction
|
||||||
|
|
@ -4682,6 +4706,108 @@ namespace TL
|
||||||
reject_comment = reject_comment,
|
reject_comment = reject_comment,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// <summary>Get <a href="https://corefork.telegram.org/api/forum">topics of a forum</a> <para>See <a href="https://corefork.telegram.org/method/messages.getForumTopics"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getForumTopics#possible-errors">details</a>)</para></summary>
|
||||||
|
/// <param name="peer">Peer</param>
|
||||||
|
/// <param name="q">Search query</param>
|
||||||
|
/// <param name="offset_date"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a>, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic.</param>
|
||||||
|
/// <param name="offset_id"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a>, ID of the last message of the last found topic (or initially <c>0</c>).</param>
|
||||||
|
/// <param name="offset_topic"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a>, ID of the last found topic (or initially <c>0</c>).</param>
|
||||||
|
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a>. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit.</param>
|
||||||
|
public static Task<Messages_ForumTopics> Messages_GetForumTopics(this Client client, InputPeer peer, DateTime offset_date = default, int offset_id = default, int offset_topic = default, int limit = int.MaxValue, string q = null)
|
||||||
|
=> client.Invoke(new Messages_GetForumTopics
|
||||||
|
{
|
||||||
|
flags = (Messages_GetForumTopics.Flags)(q != null ? 0x1 : 0),
|
||||||
|
peer = peer,
|
||||||
|
q = q,
|
||||||
|
offset_date = offset_date,
|
||||||
|
offset_id = offset_id,
|
||||||
|
offset_topic = offset_topic,
|
||||||
|
limit = limit,
|
||||||
|
});
|
||||||
|
|
||||||
|
/// <summary>Get forum topics by their ID <para>See <a href="https://corefork.telegram.org/method/messages.getForumTopicsByID"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.getForumTopicsByID#possible-errors">details</a>)</para></summary>
|
||||||
|
/// <param name="peer">Peer</param>
|
||||||
|
/// <param name="topics">Topic IDs</param>
|
||||||
|
public static Task<Messages_ForumTopics> Messages_GetForumTopicsByID(this Client client, InputPeer peer, params int[] topics)
|
||||||
|
=> client.Invoke(new Messages_GetForumTopicsByID
|
||||||
|
{
|
||||||
|
peer = peer,
|
||||||
|
topics = topics,
|
||||||
|
});
|
||||||
|
|
||||||
|
/// <summary>Edit <a href="https://corefork.telegram.org/api/forum">forum topic</a>; requires <a href="https://corefork.telegram.org/api/rights"><c>manage_topics</c> rights</a>. <para>See <a href="https://corefork.telegram.org/method/messages.editForumTopic"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.editForumTopic#possible-errors">details</a>)</para></summary>
|
||||||
|
/// <param name="peer">Peer</param>
|
||||||
|
/// <param name="topic_id">Topic ID</param>
|
||||||
|
/// <param name="title">If present, will update the topic title (maximum UTF-8 length: 128).</param>
|
||||||
|
/// <param name="icon_emoji_id">If present, updates the <a href="https://corefork.telegram.org/api/custom-emoji">custom emoji</a> used as topic icon. <a href="https://corefork.telegram.org/api/premium">Telegram Premium</a> users can use any custom emoji, other users can only use the custom emojis contained in the <see cref="InputStickerSetEmojiDefaultTopicIcons"/> emoji pack. Pass 0 to switch to the fallback topic icon.</param>
|
||||||
|
/// <param name="closed">If present, will update the open/closed status of the topic.</param>
|
||||||
|
/// <param name="hidden">If present, will hide/unhide the topic (only valid for the "General" topic, <c>id=1</c>).</param>
|
||||||
|
public static Task<UpdatesBase> Messages_EditForumTopic(this Client client, InputPeer peer, int topic_id, string title = null, long? icon_emoji_id = null, bool? closed = default, bool? hidden = default)
|
||||||
|
=> client.Invoke(new Messages_EditForumTopic
|
||||||
|
{
|
||||||
|
flags = (Messages_EditForumTopic.Flags)((title != null ? 0x1 : 0) | (icon_emoji_id != null ? 0x2 : 0) | (closed != default ? 0x4 : 0) | (hidden != default ? 0x8 : 0)),
|
||||||
|
peer = peer,
|
||||||
|
topic_id = topic_id,
|
||||||
|
title = title,
|
||||||
|
icon_emoji_id = icon_emoji_id ?? default,
|
||||||
|
closed = closed ?? default,
|
||||||
|
hidden = hidden ?? default,
|
||||||
|
});
|
||||||
|
|
||||||
|
/// <summary>Pin or unpin <a href="https://corefork.telegram.org/api/forum">forum topics</a> <para>See <a href="https://corefork.telegram.org/method/messages.updatePinnedForumTopic"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.updatePinnedForumTopic#possible-errors">details</a>)</para></summary>
|
||||||
|
/// <param name="peer">Peer</param>
|
||||||
|
/// <param name="topic_id"><a href="https://corefork.telegram.org/api/forum">Forum topic ID</a></param>
|
||||||
|
/// <param name="pinned">Whether to pin or unpin the topic</param>
|
||||||
|
public static Task<UpdatesBase> Messages_UpdatePinnedForumTopic(this Client client, InputPeer peer, int topic_id, bool pinned)
|
||||||
|
=> client.Invoke(new Messages_UpdatePinnedForumTopic
|
||||||
|
{
|
||||||
|
peer = peer,
|
||||||
|
topic_id = topic_id,
|
||||||
|
pinned = pinned,
|
||||||
|
});
|
||||||
|
|
||||||
|
/// <summary>Reorder pinned forum topics <para>See <a href="https://corefork.telegram.org/method/messages.reorderPinnedForumTopics"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/messages.reorderPinnedForumTopics#possible-errors">details</a>)</para></summary>
|
||||||
|
/// <param name="force">If not set, the order of only the topics present both server-side and in <c>order</c> will be changed (i.e. mentioning topics not pinned server-side in <c>order</c> will not pin them, and not mentioning topics pinned server-side will not unpin them). <br/>If set, the entire server-side pinned topic list will be replaced with <c>order</c> (i.e. mentioning topics not pinned server-side in <c>order</c> will pin them, and not mentioning topics pinned server-side will unpin them)</param>
|
||||||
|
/// <param name="peer">Peer</param>
|
||||||
|
/// <param name="order"><a href="https://corefork.telegram.org/api/forum">Topic IDs »</a></param>
|
||||||
|
public static Task<UpdatesBase> Messages_ReorderPinnedForumTopics(this Client client, InputPeer peer, int[] order, bool force = false)
|
||||||
|
=> client.Invoke(new Messages_ReorderPinnedForumTopics
|
||||||
|
{
|
||||||
|
flags = (Messages_ReorderPinnedForumTopics.Flags)(force ? 0x1 : 0),
|
||||||
|
peer = peer,
|
||||||
|
order = order,
|
||||||
|
});
|
||||||
|
|
||||||
|
/// <summary>Create a <a href="https://corefork.telegram.org/api/forum">forum topic</a>; requires <a href="https://corefork.telegram.org/api/rights"><c>manage_topics</c> rights</a>. <para>See <a href="https://corefork.telegram.org/method/messages.createForumTopic"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.createForumTopic#possible-errors">details</a>)</para></summary>
|
||||||
|
/// <param name="peer">Peer</param>
|
||||||
|
/// <param name="title">Topic title (maximum UTF-8 length: 128)</param>
|
||||||
|
/// <param name="icon_color">If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of <c>0x6FB9F0</c>, <c>0xFFD67E</c>, <c>0xCB86DB</c>, <c>0x8EEE98</c>, <c>0xFF93B2</c>, or <c>0xFB6F5F</c>.</param>
|
||||||
|
/// <param name="icon_emoji_id">ID of the <a href="https://corefork.telegram.org/api/custom-emoji">custom emoji</a> used as topic icon. <a href="https://corefork.telegram.org/api/premium">Telegram Premium</a> users can use any custom emoji, other users can only use the custom emojis contained in the <see cref="InputStickerSetEmojiDefaultTopicIcons"/> emoji pack.</param>
|
||||||
|
/// <param name="random_id">Unique client message ID to prevent duplicate sending of the same event <para>You can use <see cref="WTelegram.Helpers.RandomLong"/></para></param>
|
||||||
|
/// <param name="send_as">Create the topic as the specified peer</param>
|
||||||
|
public static Task<UpdatesBase> Messages_CreateForumTopic(this Client client, InputPeer peer, string title, long random_id, int? icon_color = null, InputPeer send_as = null, long? icon_emoji_id = null, bool title_missing = false)
|
||||||
|
=> client.Invoke(new Messages_CreateForumTopic
|
||||||
|
{
|
||||||
|
flags = (Messages_CreateForumTopic.Flags)((icon_color != null ? 0x1 : 0) | (send_as != null ? 0x4 : 0) | (icon_emoji_id != null ? 0x8 : 0) | (title_missing ? 0x10 : 0)),
|
||||||
|
peer = peer,
|
||||||
|
title = title,
|
||||||
|
icon_color = icon_color ?? default,
|
||||||
|
icon_emoji_id = icon_emoji_id ?? default,
|
||||||
|
random_id = random_id,
|
||||||
|
send_as = send_as,
|
||||||
|
});
|
||||||
|
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.deleteTopicHistory"/></para></summary>
|
||||||
|
/// <summary>Delete message history of a <a href="https://corefork.telegram.org/api/forum">forum topic</a> <para>See <a href="https://corefork.telegram.org/method/messages.deleteTopicHistory"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/messages.deleteTopicHistory#possible-errors">details</a>)</para></summary>
|
||||||
|
/// <param name="peer">Peer</param>
|
||||||
|
/// <param name="top_msg_id">Topic ID</param>
|
||||||
|
public static Task<Messages_AffectedHistory> Messages_DeleteTopicHistory(this Client client, InputPeer peer, int top_msg_id)
|
||||||
|
=> client.InvokeAffected(new Messages_DeleteTopicHistory
|
||||||
|
{
|
||||||
|
peer = peer,
|
||||||
|
top_msg_id = top_msg_id,
|
||||||
|
}, peer is InputPeerChannel ipc ? ipc.channel_id : 0);
|
||||||
|
|
||||||
/// <summary>Returns a current state of updates. <para>See <a href="https://corefork.telegram.org/method/updates.getState"/> [bots: ✓]</para></summary>
|
/// <summary>Returns a current state of updates. <para>See <a href="https://corefork.telegram.org/method/updates.getState"/> [bots: ✓]</para></summary>
|
||||||
public static Task<Updates_State> Updates_GetState(this Client client)
|
public static Task<Updates_State> Updates_GetState(this Client client)
|
||||||
=> client.Invoke(new Updates_GetState
|
=> client.Invoke(new Updates_GetState
|
||||||
|
|
@ -5548,107 +5674,6 @@ namespace TL
|
||||||
tabs = tabs,
|
tabs = tabs,
|
||||||
});
|
});
|
||||||
|
|
||||||
/// <summary>Create a <a href="https://corefork.telegram.org/api/forum">forum topic</a>; requires <a href="https://corefork.telegram.org/api/rights"><c>manage_topics</c> rights</a>. <para>See <a href="https://corefork.telegram.org/method/channels.createForumTopic"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/channels.createForumTopic#possible-errors">details</a>)</para></summary>
|
|
||||||
/// <param name="channel"><a href="https://corefork.telegram.org/api/forum">The forum</a></param>
|
|
||||||
/// <param name="title">Topic title (maximum UTF-8 length: 128)</param>
|
|
||||||
/// <param name="icon_color">If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of <c>0x6FB9F0</c>, <c>0xFFD67E</c>, <c>0xCB86DB</c>, <c>0x8EEE98</c>, <c>0xFF93B2</c>, or <c>0xFB6F5F</c>.</param>
|
|
||||||
/// <param name="icon_emoji_id">ID of the <a href="https://corefork.telegram.org/api/custom-emoji">custom emoji</a> used as topic icon. <a href="https://corefork.telegram.org/api/premium">Telegram Premium</a> users can use any custom emoji, other users can only use the custom emojis contained in the <see cref="InputStickerSetEmojiDefaultTopicIcons"/> emoji pack.</param>
|
|
||||||
/// <param name="random_id">Unique client message ID to prevent duplicate sending of the same event <para>You can use <see cref="WTelegram.Helpers.RandomLong"/></para></param>
|
|
||||||
/// <param name="send_as">Create the topic as the specified peer</param>
|
|
||||||
public static Task<UpdatesBase> Channels_CreateForumTopic(this Client client, InputChannelBase channel, string title, long random_id, int? icon_color = null, InputPeer send_as = null, long? icon_emoji_id = null)
|
|
||||||
=> client.Invoke(new Channels_CreateForumTopic
|
|
||||||
{
|
|
||||||
flags = (Channels_CreateForumTopic.Flags)((icon_color != null ? 0x1 : 0) | (send_as != null ? 0x4 : 0) | (icon_emoji_id != null ? 0x8 : 0)),
|
|
||||||
channel = channel,
|
|
||||||
title = title,
|
|
||||||
icon_color = icon_color ?? default,
|
|
||||||
icon_emoji_id = icon_emoji_id ?? default,
|
|
||||||
random_id = random_id,
|
|
||||||
send_as = send_as,
|
|
||||||
});
|
|
||||||
|
|
||||||
/// <summary>Get <a href="https://corefork.telegram.org/api/forum">topics of a forum</a> <para>See <a href="https://corefork.telegram.org/method/channels.getForumTopics"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.getForumTopics#possible-errors">details</a>)</para></summary>
|
|
||||||
/// <param name="channel">Supergroup</param>
|
|
||||||
/// <param name="q">Search query</param>
|
|
||||||
/// <param name="offset_date"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a>, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic.</param>
|
|
||||||
/// <param name="offset_id"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a>, ID of the last message of the last found topic (or initially <c>0</c>).</param>
|
|
||||||
/// <param name="offset_topic"><a href="https://corefork.telegram.org/api/offsets">Offsets for pagination, for more info click here</a>, ID of the last found topic (or initially <c>0</c>).</param>
|
|
||||||
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</a>. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit.</param>
|
|
||||||
public static Task<Messages_ForumTopics> Channels_GetForumTopics(this Client client, InputChannelBase channel, DateTime offset_date = default, int offset_id = default, int offset_topic = default, int limit = int.MaxValue, string q = null)
|
|
||||||
=> client.Invoke(new Channels_GetForumTopics
|
|
||||||
{
|
|
||||||
flags = (Channels_GetForumTopics.Flags)(q != null ? 0x1 : 0),
|
|
||||||
channel = channel,
|
|
||||||
q = q,
|
|
||||||
offset_date = offset_date,
|
|
||||||
offset_id = offset_id,
|
|
||||||
offset_topic = offset_topic,
|
|
||||||
limit = limit,
|
|
||||||
});
|
|
||||||
|
|
||||||
/// <summary>Get forum topics by their ID <para>See <a href="https://corefork.telegram.org/method/channels.getForumTopicsByID"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.getForumTopicsByID#possible-errors">details</a>)</para></summary>
|
|
||||||
/// <param name="channel">Forum</param>
|
|
||||||
/// <param name="topics">Topic IDs</param>
|
|
||||||
public static Task<Messages_ForumTopics> Channels_GetForumTopicsByID(this Client client, InputChannelBase channel, params int[] topics)
|
|
||||||
=> client.Invoke(new Channels_GetForumTopicsByID
|
|
||||||
{
|
|
||||||
channel = channel,
|
|
||||||
topics = topics,
|
|
||||||
});
|
|
||||||
|
|
||||||
/// <summary>Edit <a href="https://corefork.telegram.org/api/forum">forum topic</a>; requires <a href="https://corefork.telegram.org/api/rights"><c>manage_topics</c> rights</a>. <para>See <a href="https://corefork.telegram.org/method/channels.editForumTopic"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/channels.editForumTopic#possible-errors">details</a>)</para></summary>
|
|
||||||
/// <param name="channel">Supergroup</param>
|
|
||||||
/// <param name="topic_id">Topic ID</param>
|
|
||||||
/// <param name="title">If present, will update the topic title (maximum UTF-8 length: 128).</param>
|
|
||||||
/// <param name="icon_emoji_id">If present, updates the <a href="https://corefork.telegram.org/api/custom-emoji">custom emoji</a> used as topic icon. <a href="https://corefork.telegram.org/api/premium">Telegram Premium</a> users can use any custom emoji, other users can only use the custom emojis contained in the <see cref="InputStickerSetEmojiDefaultTopicIcons"/> emoji pack. Pass 0 to switch to the fallback topic icon.</param>
|
|
||||||
/// <param name="closed">If present, will update the open/closed status of the topic.</param>
|
|
||||||
/// <param name="hidden">If present, will hide/unhide the topic (only valid for the "General" topic, <c>id=1</c>).</param>
|
|
||||||
public static Task<UpdatesBase> Channels_EditForumTopic(this Client client, InputChannelBase channel, int topic_id, string title = null, long? icon_emoji_id = null, bool? closed = default, bool? hidden = default)
|
|
||||||
=> client.Invoke(new Channels_EditForumTopic
|
|
||||||
{
|
|
||||||
flags = (Channels_EditForumTopic.Flags)((title != null ? 0x1 : 0) | (icon_emoji_id != null ? 0x2 : 0) | (closed != default ? 0x4 : 0) | (hidden != default ? 0x8 : 0)),
|
|
||||||
channel = channel,
|
|
||||||
topic_id = topic_id,
|
|
||||||
title = title,
|
|
||||||
icon_emoji_id = icon_emoji_id ?? default,
|
|
||||||
closed = closed ?? default,
|
|
||||||
hidden = hidden ?? default,
|
|
||||||
});
|
|
||||||
|
|
||||||
/// <summary>Pin or unpin <a href="https://corefork.telegram.org/api/forum">forum topics</a> <para>See <a href="https://corefork.telegram.org/method/channels.updatePinnedForumTopic"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.updatePinnedForumTopic#possible-errors">details</a>)</para></summary>
|
|
||||||
/// <param name="channel">Supergroup ID</param>
|
|
||||||
/// <param name="topic_id"><a href="https://corefork.telegram.org/api/forum">Forum topic ID</a></param>
|
|
||||||
/// <param name="pinned">Whether to pin or unpin the topic</param>
|
|
||||||
public static Task<UpdatesBase> Channels_UpdatePinnedForumTopic(this Client client, InputChannelBase channel, int topic_id, bool pinned)
|
|
||||||
=> client.Invoke(new Channels_UpdatePinnedForumTopic
|
|
||||||
{
|
|
||||||
channel = channel,
|
|
||||||
topic_id = topic_id,
|
|
||||||
pinned = pinned,
|
|
||||||
});
|
|
||||||
|
|
||||||
/// <summary>Delete message history of a <a href="https://corefork.telegram.org/api/forum">forum topic</a> <para>See <a href="https://corefork.telegram.org/method/channels.deleteTopicHistory"/> [bots: ✓]</para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/channels.deleteTopicHistory#possible-errors">details</a>)</para></summary>
|
|
||||||
/// <param name="channel">Forum</param>
|
|
||||||
/// <param name="top_msg_id">Topic ID</param>
|
|
||||||
public static Task<Messages_AffectedHistory> Channels_DeleteTopicHistory(this Client client, InputChannelBase channel, int top_msg_id)
|
|
||||||
=> client.InvokeAffected(new Channels_DeleteTopicHistory
|
|
||||||
{
|
|
||||||
channel = channel,
|
|
||||||
top_msg_id = top_msg_id,
|
|
||||||
}, channel.ChannelId);
|
|
||||||
|
|
||||||
/// <summary>Reorder pinned forum topics <para>See <a href="https://corefork.telegram.org/method/channels.reorderPinnedForumTopics"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.reorderPinnedForumTopics#possible-errors">details</a>)</para></summary>
|
|
||||||
/// <param name="force">If not set, the order of only the topics present both server-side and in <c>order</c> will be changed (i.e. mentioning topics not pinned server-side in <c>order</c> will not pin them, and not mentioning topics pinned server-side will not unpin them). <br/>If set, the entire server-side pinned topic list will be replaced with <c>order</c> (i.e. mentioning topics not pinned server-side in <c>order</c> will pin them, and not mentioning topics pinned server-side will unpin them)</param>
|
|
||||||
/// <param name="channel">Supergroup ID</param>
|
|
||||||
/// <param name="order"><a href="https://corefork.telegram.org/api/forum">Topic IDs »</a></param>
|
|
||||||
public static Task<UpdatesBase> 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,
|
|
||||||
});
|
|
||||||
|
|
||||||
/// <summary>Enable or disable the <a href="https://corefork.telegram.org/api/antispam">native antispam system</a>. <para>See <a href="https://corefork.telegram.org/method/channels.toggleAntiSpam"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.toggleAntiSpam#possible-errors">details</a>)</para></summary>
|
/// <summary>Enable or disable the <a href="https://corefork.telegram.org/api/antispam">native antispam system</a>. <para>See <a href="https://corefork.telegram.org/method/channels.toggleAntiSpam"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/channels.toggleAntiSpam#possible-errors">details</a>)</para></summary>
|
||||||
/// <param name="channel">Supergroup ID. The specified supergroup must have at least <c>telegram_antispam_group_size_min</c> members to enable antispam functionality, as specified by the <a href="https://corefork.telegram.org/api/config#client-configuration">client configuration parameters</a>.</param>
|
/// <param name="channel">Supergroup ID. The specified supergroup must have at least <c>telegram_antispam_group_size_min</c> members to enable antispam functionality, as specified by the <a href="https://corefork.telegram.org/api/config#client-configuration">client configuration parameters</a>.</param>
|
||||||
/// <param name="enabled">Enable or disable the native antispam system.</param>
|
/// <param name="enabled">Enable or disable the native antispam system.</param>
|
||||||
|
|
@ -6589,10 +6614,10 @@ namespace TL
|
||||||
/// <param name="collection_id">Only returns gifts within the specified <a href="https://corefork.telegram.org/api/gifts#gift-collections">collection »</a>.</param>
|
/// <param name="collection_id">Only returns gifts within the specified <a href="https://corefork.telegram.org/api/gifts#gift-collections">collection »</a>.</param>
|
||||||
/// <param name="offset"><a href="https://corefork.telegram.org/api/offsets">Offset for pagination</a>.</param>
|
/// <param name="offset"><a href="https://corefork.telegram.org/api/offsets">Offset for pagination</a>.</param>
|
||||||
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</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<Payments_SavedStarGifts> Payments_GetSavedStarGifts(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, int? collection_id = null, bool exclude_unsaved = false, bool exclude_saved = false, bool exclude_unlimited = false, bool exclude_unique = false, bool sort_by_value = false, bool exclude_upgradable = false, bool exclude_unupgradable = false)
|
public static Task<Payments_SavedStarGifts> Payments_GetSavedStarGifts(this Client client, InputPeer peer, string offset, int limit = int.MaxValue, int? collection_id = null, bool exclude_unsaved = false, bool exclude_saved = false, bool exclude_unlimited = false, bool exclude_unique = false, bool sort_by_value = false, bool exclude_upgradable = false, bool exclude_unupgradable = false, bool peer_color_available = false, bool exclude_hosted = false)
|
||||||
=> client.Invoke(new Payments_GetSavedStarGifts
|
=> client.Invoke(new Payments_GetSavedStarGifts
|
||||||
{
|
{
|
||||||
flags = (Payments_GetSavedStarGifts.Flags)((collection_id != null ? 0x40 : 0) | (exclude_unsaved ? 0x1 : 0) | (exclude_saved ? 0x2 : 0) | (exclude_unlimited ? 0x4 : 0) | (exclude_unique ? 0x10 : 0) | (sort_by_value ? 0x20 : 0) | (exclude_upgradable ? 0x80 : 0) | (exclude_unupgradable ? 0x100 : 0)),
|
flags = (Payments_GetSavedStarGifts.Flags)((collection_id != null ? 0x40 : 0) | (exclude_unsaved ? 0x1 : 0) | (exclude_saved ? 0x2 : 0) | (exclude_unlimited ? 0x4 : 0) | (exclude_unique ? 0x10 : 0) | (sort_by_value ? 0x20 : 0) | (exclude_upgradable ? 0x80 : 0) | (exclude_unupgradable ? 0x100 : 0) | (peer_color_available ? 0x200 : 0) | (exclude_hosted ? 0x400 : 0)),
|
||||||
peer = peer,
|
peer = peer,
|
||||||
collection_id = collection_id ?? default,
|
collection_id = collection_id ?? default,
|
||||||
offset = offset,
|
offset = offset,
|
||||||
|
|
@ -6648,10 +6673,10 @@ namespace TL
|
||||||
/// <summary>Get <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible gifts</a> of a specific type currently on resale, see <a href="https://corefork.telegram.org/api/gifts#reselling-collectible-gifts">here »</a> for more info. <para>See <a href="https://corefork.telegram.org/method/payments.getResaleStarGifts"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.getResaleStarGifts#possible-errors">details</a>)</para></summary>
|
/// <summary>Get <a href="https://corefork.telegram.org/api/gifts#collectible-gifts">collectible gifts</a> of a specific type currently on resale, see <a href="https://corefork.telegram.org/api/gifts#reselling-collectible-gifts">here »</a> for more info. <para>See <a href="https://corefork.telegram.org/method/payments.getResaleStarGifts"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/payments.getResaleStarGifts#possible-errors">details</a>)</para></summary>
|
||||||
/// <param name="sort_by_price">Sort gifts by price (ascending).</param>
|
/// <param name="sort_by_price">Sort gifts by price (ascending).</param>
|
||||||
/// <param name="sort_by_num">Sort gifts by number (ascending).</param>
|
/// <param name="sort_by_num">Sort gifts by number (ascending).</param>
|
||||||
/// <param name="attributes_hash">If a previous call to the method was made and <see cref="Payments_ResaleStarGifts"/>.<c>attributes_hash</c> was set, pass it here to avoid returning any results if they haven't changed.</param>
|
/// <param name="attributes_hash">If a previous call to the method was made and <see cref="Payments_ResaleStarGifts"/>.<c>attributes_hash</c> was set, pass it here to avoid returning any results if they haven't changed. <br/>Otherwise, set this flag and pass <c>0</c> to return <see cref="Payments_ResaleStarGifts"/>.<c>attributes_hash</c> and <see cref="Payments_ResaleStarGifts"/>.<c>attributes</c>, <strong>these two fields will not be set</strong> if this flag is not set.</param>
|
||||||
/// <param name="gift_id">Mandatory identifier of the base gift from which the collectible gift was upgraded.</param>
|
/// <param name="gift_id">Mandatory identifier of the base gift from which the collectible gift was upgraded.</param>
|
||||||
/// <param name="attributes">Optionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed.</param>
|
/// <param name="attributes">Optionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed.</param>
|
||||||
/// <param name="offset">Offset for pagination.</param>
|
/// <param name="offset">Offset for pagination. If not equal to an empty string, <see cref="Payments_ResaleStarGifts"/>.<c>counters</c> will not be set to avoid returning the counters every time a new page is fetched.</param>
|
||||||
/// <param name="limit">Maximum number of results to return, <a href="https://corefork.telegram.org/api/offsets">see pagination</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<Payments_ResaleStarGifts> Payments_GetResaleStarGifts(this Client client, long gift_id, string offset, int limit = int.MaxValue, long? attributes_hash = null, StarGiftAttributeId[] attributes = null, bool sort_by_price = false, bool sort_by_num = false)
|
public static Task<Payments_ResaleStarGifts> Payments_GetResaleStarGifts(this Client client, long gift_id, string offset, int limit = int.MaxValue, long? attributes_hash = null, StarGiftAttributeId[] attributes = null, bool sort_by_price = false, bool sort_by_num = false)
|
||||||
=> client.Invoke(new Payments_GetResaleStarGifts
|
=> client.Invoke(new Payments_GetResaleStarGifts
|
||||||
|
|
@ -7057,12 +7082,13 @@ namespace TL
|
||||||
/// <param name="reset_invite_hash">Invalidate existing invite links</param>
|
/// <param name="reset_invite_hash">Invalidate existing invite links</param>
|
||||||
/// <param name="call">Group call</param>
|
/// <param name="call">Group call</param>
|
||||||
/// <param name="join_muted">Whether all users will that join this group call are muted by default upon joining the group call</param>
|
/// <param name="join_muted">Whether all users will that join this group call are muted by default upon joining the group call</param>
|
||||||
public static Task<UpdatesBase> Phone_ToggleGroupCallSettings(this Client client, InputGroupCallBase call, bool? join_muted = default, bool reset_invite_hash = false)
|
public static Task<UpdatesBase> Phone_ToggleGroupCallSettings(this Client client, InputGroupCallBase call, bool? join_muted = default, bool? messages_enabled = default, bool reset_invite_hash = false)
|
||||||
=> client.Invoke(new Phone_ToggleGroupCallSettings
|
=> client.Invoke(new Phone_ToggleGroupCallSettings
|
||||||
{
|
{
|
||||||
flags = (Phone_ToggleGroupCallSettings.Flags)((join_muted != default ? 0x1 : 0) | (reset_invite_hash ? 0x2 : 0)),
|
flags = (Phone_ToggleGroupCallSettings.Flags)((join_muted != default ? 0x1 : 0) | (messages_enabled != default ? 0x4 : 0) | (reset_invite_hash ? 0x2 : 0)),
|
||||||
call = call,
|
call = call,
|
||||||
join_muted = join_muted ?? default,
|
join_muted = join_muted ?? default,
|
||||||
|
messages_enabled = messages_enabled ?? default,
|
||||||
});
|
});
|
||||||
|
|
||||||
/// <summary>Get info about a group call <para>See <a href="https://corefork.telegram.org/method/phone.getGroupCall"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/phone.getGroupCall#possible-errors">details</a>)</para></summary>
|
/// <summary>Get info about a group call <para>See <a href="https://corefork.telegram.org/method/phone.getGroupCall"/></para> <para>Possible <see cref="RpcException"/> codes: 400,403 (<a href="https://corefork.telegram.org/method/phone.getGroupCall#possible-errors">details</a>)</para></summary>
|
||||||
|
|
@ -7318,6 +7344,23 @@ namespace TL
|
||||||
limit = limit,
|
limit = limit,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/method/phone.sendGroupCallMessage"/></para></summary>
|
||||||
|
public static Task<bool> Phone_SendGroupCallMessage(this Client client, InputGroupCallBase call, long random_id, TextWithEntities message)
|
||||||
|
=> client.Invoke(new Phone_SendGroupCallMessage
|
||||||
|
{
|
||||||
|
call = call,
|
||||||
|
random_id = random_id,
|
||||||
|
message = message,
|
||||||
|
});
|
||||||
|
|
||||||
|
/// <summary><para>See <a href="https://corefork.telegram.org/method/phone.sendGroupCallEncryptedMessage"/></para></summary>
|
||||||
|
public static Task<bool> Phone_SendGroupCallEncryptedMessage(this Client client, InputGroupCallBase call, byte[] encrypted_message)
|
||||||
|
=> client.Invoke(new Phone_SendGroupCallEncryptedMessage
|
||||||
|
{
|
||||||
|
call = call,
|
||||||
|
encrypted_message = encrypted_message,
|
||||||
|
});
|
||||||
|
|
||||||
/// <summary>Get localization pack strings <para>See <a href="https://corefork.telegram.org/method/langpack.getLangPack"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/langpack.getLangPack#possible-errors">details</a>)</para></summary>
|
/// <summary>Get localization pack strings <para>See <a href="https://corefork.telegram.org/method/langpack.getLangPack"/></para> <para>Possible <see cref="RpcException"/> codes: 400 (<a href="https://corefork.telegram.org/method/langpack.getLangPack#possible-errors">details</a>)</para></summary>
|
||||||
/// <param name="lang_pack">Platform identifier (i.e. <c>android</c>, <c>tdesktop</c>, etc).</param>
|
/// <param name="lang_pack">Platform identifier (i.e. <c>android</c>, <c>tdesktop</c>, etc).</param>
|
||||||
/// <param name="lang_code">Either an ISO 639-1 language code or a language pack name obtained from a <a href="https://corefork.telegram.org/api/links#language-pack-links">language pack link</a>.</param>
|
/// <param name="lang_code">Either an ISO 639-1 language code or a language pack name obtained from a <a href="https://corefork.telegram.org/api/links#language-pack-links">language pack link</a>.</param>
|
||||||
|
|
@ -8359,6 +8402,14 @@ namespace TL.Methods
|
||||||
public string mnc;
|
public string mnc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TLDef(0x56E59F9C)]
|
||||||
|
public sealed partial class Auth_CheckPaidAuth : IMethod<Auth_SentCodeBase>
|
||||||
|
{
|
||||||
|
public string phone_number;
|
||||||
|
public string phone_code_hash;
|
||||||
|
public long form_id;
|
||||||
|
}
|
||||||
|
|
||||||
[TLDef(0xEC86017A)]
|
[TLDef(0xEC86017A)]
|
||||||
public sealed partial class Account_RegisterDevice : IMethod<bool>
|
public sealed partial class Account_RegisterDevice : IMethod<bool>
|
||||||
{
|
{
|
||||||
|
|
@ -9003,16 +9054,14 @@ namespace TL.Methods
|
||||||
public string[] codes;
|
public string[] codes;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TLDef(0x7CEFA15D)]
|
[TLDef(0x684D214E)]
|
||||||
public sealed partial class Account_UpdateColor : IMethod<bool>
|
public sealed partial class Account_UpdateColor : IMethod<bool>
|
||||||
{
|
{
|
||||||
public Flags flags;
|
public Flags flags;
|
||||||
[IfFlag(2)] public int color;
|
[IfFlag(2)] public PeerColorBase color;
|
||||||
[IfFlag(0)] public long background_emoji_id;
|
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
[Flags] public enum Flags : uint
|
||||||
{
|
{
|
||||||
has_background_emoji_id = 0x1,
|
|
||||||
for_profile = 0x2,
|
for_profile = 0x2,
|
||||||
has_color = 0x4,
|
has_color = 0x4,
|
||||||
}
|
}
|
||||||
|
|
@ -9256,10 +9305,10 @@ namespace TL.Methods
|
||||||
public long hash;
|
public long hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TLDef(0xFE74EF9F)]
|
[TLDef(0xE42CE9C9)]
|
||||||
public sealed partial class Account_GetUniqueGiftChatThemes : IMethod<Account_ChatThemes>
|
public sealed partial class Account_GetUniqueGiftChatThemes : IMethod<Account_ChatThemes>
|
||||||
{
|
{
|
||||||
public int offset;
|
public string offset;
|
||||||
public int limit;
|
public int limit;
|
||||||
public long hash;
|
public long hash;
|
||||||
}
|
}
|
||||||
|
|
@ -9305,6 +9354,13 @@ namespace TL.Methods
|
||||||
public InputDocument[] documents;
|
public InputDocument[] documents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TLDef(0xFC533372)]
|
||||||
|
public sealed partial class Users_SuggestBirthday : IMethod<UpdatesBase>
|
||||||
|
{
|
||||||
|
public InputUserBase id;
|
||||||
|
public Birthday birthday;
|
||||||
|
}
|
||||||
|
|
||||||
[TLDef(0x7ADC669D)]
|
[TLDef(0x7ADC669D)]
|
||||||
public sealed partial class Contacts_GetContactIDs : IMethod<int[]>
|
public sealed partial class Contacts_GetContactIDs : IMethod<int[]>
|
||||||
{
|
{
|
||||||
|
|
@ -9436,7 +9492,7 @@ namespace TL.Methods
|
||||||
public bool enabled;
|
public bool enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TLDef(0xE8F463D0)]
|
[TLDef(0xD9BA2E54)]
|
||||||
public sealed partial class Contacts_AddContact : IMethod<UpdatesBase>
|
public sealed partial class Contacts_AddContact : IMethod<UpdatesBase>
|
||||||
{
|
{
|
||||||
public Flags flags;
|
public Flags flags;
|
||||||
|
|
@ -9444,10 +9500,12 @@ namespace TL.Methods
|
||||||
public string first_name;
|
public string first_name;
|
||||||
public string last_name;
|
public string last_name;
|
||||||
public string phone;
|
public string phone;
|
||||||
|
[IfFlag(1)] public TextWithEntities note;
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
[Flags] public enum Flags : uint
|
||||||
{
|
{
|
||||||
add_phone_privacy_exception = 0x1,
|
add_phone_privacy_exception = 0x1,
|
||||||
|
has_note = 0x2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9528,6 +9586,13 @@ namespace TL.Methods
|
||||||
public string q;
|
public string q;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TLDef(0x139F63FB)]
|
||||||
|
public sealed partial class Contacts_UpdateContactNote : IMethod<bool>
|
||||||
|
{
|
||||||
|
public InputUserBase id;
|
||||||
|
public TextWithEntities note;
|
||||||
|
}
|
||||||
|
|
||||||
[TLDef(0x63C66506)]
|
[TLDef(0x63C66506)]
|
||||||
public sealed partial class Messages_GetMessages : IMethod<Messages_MessagesBase>
|
public sealed partial class Messages_GetMessages : IMethod<Messages_MessagesBase>
|
||||||
{
|
{
|
||||||
|
|
@ -11991,6 +12056,98 @@ namespace TL.Methods
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TLDef(0x3BA47BFF)]
|
||||||
|
public sealed partial class Messages_GetForumTopics : IMethod<Messages_ForumTopics>
|
||||||
|
{
|
||||||
|
public Flags flags;
|
||||||
|
public InputPeer peer;
|
||||||
|
[IfFlag(0)] public string q;
|
||||||
|
public DateTime offset_date;
|
||||||
|
public int offset_id;
|
||||||
|
public int offset_topic;
|
||||||
|
public int limit;
|
||||||
|
|
||||||
|
[Flags] public enum Flags : uint
|
||||||
|
{
|
||||||
|
has_q = 0x1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[TLDef(0xAF0A4A08)]
|
||||||
|
public sealed partial class Messages_GetForumTopicsByID : IMethod<Messages_ForumTopics>
|
||||||
|
{
|
||||||
|
public InputPeer peer;
|
||||||
|
public int[] topics;
|
||||||
|
}
|
||||||
|
|
||||||
|
[TLDef(0xCECC1134)]
|
||||||
|
public sealed partial class Messages_EditForumTopic : IMethod<UpdatesBase>
|
||||||
|
{
|
||||||
|
public Flags flags;
|
||||||
|
public InputPeer peer;
|
||||||
|
public int topic_id;
|
||||||
|
[IfFlag(0)] public string title;
|
||||||
|
[IfFlag(1)] public long icon_emoji_id;
|
||||||
|
[IfFlag(2)] public bool closed;
|
||||||
|
[IfFlag(3)] public bool hidden;
|
||||||
|
|
||||||
|
[Flags] public enum Flags : uint
|
||||||
|
{
|
||||||
|
has_title = 0x1,
|
||||||
|
has_icon_emoji_id = 0x2,
|
||||||
|
has_closed = 0x4,
|
||||||
|
has_hidden = 0x8,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[TLDef(0x175DF251)]
|
||||||
|
public sealed partial class Messages_UpdatePinnedForumTopic : IMethod<UpdatesBase>
|
||||||
|
{
|
||||||
|
public InputPeer peer;
|
||||||
|
public int topic_id;
|
||||||
|
public bool pinned;
|
||||||
|
}
|
||||||
|
|
||||||
|
[TLDef(0x0E7841F0)]
|
||||||
|
public sealed partial class Messages_ReorderPinnedForumTopics : IMethod<UpdatesBase>
|
||||||
|
{
|
||||||
|
public Flags flags;
|
||||||
|
public InputPeer peer;
|
||||||
|
public int[] order;
|
||||||
|
|
||||||
|
[Flags] public enum Flags : uint
|
||||||
|
{
|
||||||
|
force = 0x1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[TLDef(0x2F98C3D5)]
|
||||||
|
public sealed partial class Messages_CreateForumTopic : IMethod<UpdatesBase>
|
||||||
|
{
|
||||||
|
public Flags flags;
|
||||||
|
public InputPeer peer;
|
||||||
|
public string title;
|
||||||
|
[IfFlag(0)] public int icon_color;
|
||||||
|
[IfFlag(3)] public long icon_emoji_id;
|
||||||
|
public long random_id;
|
||||||
|
[IfFlag(2)] public InputPeer send_as;
|
||||||
|
|
||||||
|
[Flags] public enum Flags : uint
|
||||||
|
{
|
||||||
|
has_icon_color = 0x1,
|
||||||
|
has_send_as = 0x4,
|
||||||
|
has_icon_emoji_id = 0x8,
|
||||||
|
title_missing = 0x10,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[TLDef(0xD2816F10)]
|
||||||
|
public sealed partial class Messages_DeleteTopicHistory : IMethod<Messages_AffectedHistory>
|
||||||
|
{
|
||||||
|
public InputPeer peer;
|
||||||
|
public int top_msg_id;
|
||||||
|
}
|
||||||
|
|
||||||
[TLDef(0xEDD4882A)]
|
[TLDef(0xEDD4882A)]
|
||||||
public sealed partial class Updates_GetState : IMethod<Updates_State> { }
|
public sealed partial class Updates_GetState : IMethod<Updates_State> { }
|
||||||
|
|
||||||
|
|
@ -12648,97 +12805,6 @@ namespace TL.Methods
|
||||||
public bool tabs;
|
public bool tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TLDef(0xF40C0224)]
|
|
||||||
public sealed partial class Channels_CreateForumTopic : IMethod<UpdatesBase>
|
|
||||||
{
|
|
||||||
public Flags flags;
|
|
||||||
public InputChannelBase channel;
|
|
||||||
public string title;
|
|
||||||
[IfFlag(0)] public int icon_color;
|
|
||||||
[IfFlag(3)] public long icon_emoji_id;
|
|
||||||
public long random_id;
|
|
||||||
[IfFlag(2)] public InputPeer send_as;
|
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
|
||||||
{
|
|
||||||
has_icon_color = 0x1,
|
|
||||||
has_send_as = 0x4,
|
|
||||||
has_icon_emoji_id = 0x8,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TLDef(0x0DE560D1)]
|
|
||||||
public sealed partial class Channels_GetForumTopics : IMethod<Messages_ForumTopics>
|
|
||||||
{
|
|
||||||
public Flags flags;
|
|
||||||
public InputChannelBase channel;
|
|
||||||
[IfFlag(0)] public string q;
|
|
||||||
public DateTime offset_date;
|
|
||||||
public int offset_id;
|
|
||||||
public int offset_topic;
|
|
||||||
public int limit;
|
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
|
||||||
{
|
|
||||||
has_q = 0x1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TLDef(0xB0831EB9)]
|
|
||||||
public sealed partial class Channels_GetForumTopicsByID : IMethod<Messages_ForumTopics>
|
|
||||||
{
|
|
||||||
public InputChannelBase channel;
|
|
||||||
public int[] topics;
|
|
||||||
}
|
|
||||||
|
|
||||||
[TLDef(0xF4DFA185)]
|
|
||||||
public sealed partial class Channels_EditForumTopic : IMethod<UpdatesBase>
|
|
||||||
{
|
|
||||||
public Flags flags;
|
|
||||||
public InputChannelBase channel;
|
|
||||||
public int topic_id;
|
|
||||||
[IfFlag(0)] public string title;
|
|
||||||
[IfFlag(1)] public long icon_emoji_id;
|
|
||||||
[IfFlag(2)] public bool closed;
|
|
||||||
[IfFlag(3)] public bool hidden;
|
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
|
||||||
{
|
|
||||||
has_title = 0x1,
|
|
||||||
has_icon_emoji_id = 0x2,
|
|
||||||
has_closed = 0x4,
|
|
||||||
has_hidden = 0x8,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TLDef(0x6C2D9026)]
|
|
||||||
public sealed partial class Channels_UpdatePinnedForumTopic : IMethod<UpdatesBase>
|
|
||||||
{
|
|
||||||
public InputChannelBase channel;
|
|
||||||
public int topic_id;
|
|
||||||
public bool pinned;
|
|
||||||
}
|
|
||||||
|
|
||||||
[TLDef(0x34435F2D)]
|
|
||||||
public sealed partial class Channels_DeleteTopicHistory : IMethod<Messages_AffectedHistory>
|
|
||||||
{
|
|
||||||
public InputChannelBase channel;
|
|
||||||
public int top_msg_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
[TLDef(0x2950A18F)]
|
|
||||||
public sealed partial class Channels_ReorderPinnedForumTopics : IMethod<UpdatesBase>
|
|
||||||
{
|
|
||||||
public Flags flags;
|
|
||||||
public InputChannelBase channel;
|
|
||||||
public int[] order;
|
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
|
||||||
{
|
|
||||||
force = 0x1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[TLDef(0x68F3E4EB)]
|
[TLDef(0x68F3E4EB)]
|
||||||
public sealed partial class Channels_ToggleAntiSpam : IMethod<UpdatesBase>
|
public sealed partial class Channels_ToggleAntiSpam : IMethod<UpdatesBase>
|
||||||
{
|
{
|
||||||
|
|
@ -13551,6 +13617,8 @@ namespace TL.Methods
|
||||||
has_collection_id = 0x40,
|
has_collection_id = 0x40,
|
||||||
exclude_upgradable = 0x80,
|
exclude_upgradable = 0x80,
|
||||||
exclude_unupgradable = 0x100,
|
exclude_unupgradable = 0x100,
|
||||||
|
peer_color_available = 0x200,
|
||||||
|
exclude_hosted = 0x400,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -13925,17 +13993,19 @@ namespace TL.Methods
|
||||||
public InputGroupCallBase call;
|
public InputGroupCallBase call;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TLDef(0x74BBB43D)]
|
[TLDef(0xE9723804)]
|
||||||
public sealed partial class Phone_ToggleGroupCallSettings : IMethod<UpdatesBase>
|
public sealed partial class Phone_ToggleGroupCallSettings : IMethod<UpdatesBase>
|
||||||
{
|
{
|
||||||
public Flags flags;
|
public Flags flags;
|
||||||
public InputGroupCallBase call;
|
public InputGroupCallBase call;
|
||||||
[IfFlag(0)] public bool join_muted;
|
[IfFlag(0)] public bool join_muted;
|
||||||
|
[IfFlag(2)] public bool messages_enabled;
|
||||||
|
|
||||||
[Flags] public enum Flags : uint
|
[Flags] public enum Flags : uint
|
||||||
{
|
{
|
||||||
has_join_muted = 0x1,
|
has_join_muted = 0x1,
|
||||||
reset_invite_hash = 0x2,
|
reset_invite_hash = 0x2,
|
||||||
|
has_messages_enabled = 0x4,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -14148,6 +14218,21 @@ namespace TL.Methods
|
||||||
public int limit;
|
public int limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TLDef(0x87893014)]
|
||||||
|
public sealed partial class Phone_SendGroupCallMessage : IMethod<bool>
|
||||||
|
{
|
||||||
|
public InputGroupCallBase call;
|
||||||
|
public long random_id;
|
||||||
|
public TextWithEntities message;
|
||||||
|
}
|
||||||
|
|
||||||
|
[TLDef(0xE5AFA56D)]
|
||||||
|
public sealed partial class Phone_SendGroupCallEncryptedMessage : IMethod<bool>
|
||||||
|
{
|
||||||
|
public InputGroupCallBase call;
|
||||||
|
public byte[] encrypted_message;
|
||||||
|
}
|
||||||
|
|
||||||
[TLDef(0xF2F2330A)]
|
[TLDef(0xF2F2330A)]
|
||||||
public sealed partial class Langpack_GetLangPack : IMethod<LangPackDifference>
|
public sealed partial class Langpack_GetLangPack : IMethod<LangPackDifference>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ namespace TL
|
||||||
{
|
{
|
||||||
public static partial class Layer
|
public static partial class Layer
|
||||||
{
|
{
|
||||||
public const int Version = 214; // fetched 01/09/2025 11:20:56
|
public const int Version = 216; // fetched 10/10/2025 20:01:17
|
||||||
internal const int SecretChats = 144;
|
internal const int SecretChats = 144;
|
||||||
internal const int MTProto2 = 73;
|
internal const int MTProto2 = 73;
|
||||||
internal const uint VectorCtor = 0x1CB5C415;
|
internal const uint VectorCtor = 0x1CB5C415;
|
||||||
|
|
@ -41,7 +41,9 @@ namespace TL
|
||||||
[0x3BCBF734] = typeof(DhGenOk),
|
[0x3BCBF734] = typeof(DhGenOk),
|
||||||
[0x46DC1FB9] = typeof(DhGenRetry),
|
[0x46DC1FB9] = typeof(DhGenRetry),
|
||||||
[0xA69DAE02] = typeof(DhGenFail),
|
[0xA69DAE02] = typeof(DhGenFail),
|
||||||
[0x7ABE77EC] = typeof(Methods.Ping),
|
[0xF660E1D4] = typeof(DestroyAuthKeyOk),
|
||||||
|
[0x0A9F2259] = typeof(DestroyAuthKeyNone),
|
||||||
|
[0xEA109B13] = typeof(DestroyAuthKeyFail),
|
||||||
[0x62D6B459] = typeof(MsgsAck),
|
[0x62D6B459] = typeof(MsgsAck),
|
||||||
[0xA7EFF811] = typeof(BadMsgNotification),
|
[0xA7EFF811] = typeof(BadMsgNotification),
|
||||||
[0xEDAB447B] = typeof(BadServerSalt),
|
[0xEDAB447B] = typeof(BadServerSalt),
|
||||||
|
|
@ -66,6 +68,7 @@ namespace TL
|
||||||
[0x37982646] = typeof(IpPortSecret),
|
[0x37982646] = typeof(IpPortSecret),
|
||||||
[0x4679B65F] = typeof(AccessPointRule),
|
[0x4679B65F] = typeof(AccessPointRule),
|
||||||
[0x5A592A6C] = typeof(Help_ConfigSimple),
|
[0x5A592A6C] = typeof(Help_ConfigSimple),
|
||||||
|
[0x7ABE77EC] = typeof(Methods.Ping),
|
||||||
// from TL.SchemaExtensions:
|
// from TL.SchemaExtensions:
|
||||||
[0x3FEDD339] = typeof(True),
|
[0x3FEDD339] = typeof(True),
|
||||||
[0xC4B9F9BB] = typeof(Error),
|
[0xC4B9F9BB] = typeof(Error),
|
||||||
|
|
@ -216,7 +219,7 @@ namespace TL
|
||||||
[0x45D5B021] = typeof(MessageActionGiftStars),
|
[0x45D5B021] = typeof(MessageActionGiftStars),
|
||||||
[0xB00C47A2] = typeof(MessageActionPrizeStars),
|
[0xB00C47A2] = typeof(MessageActionPrizeStars),
|
||||||
[0xF24DE7FA] = typeof(MessageActionStarGift),
|
[0xF24DE7FA] = typeof(MessageActionStarGift),
|
||||||
[0x34F762F3] = typeof(MessageActionStarGiftUnique),
|
[0x95728543] = typeof(MessageActionStarGiftUnique),
|
||||||
[0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded),
|
[0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded),
|
||||||
[0x84B88578] = typeof(MessageActionPaidMessagesPrice),
|
[0x84B88578] = typeof(MessageActionPaidMessagesPrice),
|
||||||
[0x2FFE2F7A] = typeof(MessageActionConferenceCall),
|
[0x2FFE2F7A] = typeof(MessageActionConferenceCall),
|
||||||
|
|
@ -226,6 +229,7 @@ namespace TL
|
||||||
[0x95DDCF69] = typeof(MessageActionSuggestedPostSuccess),
|
[0x95DDCF69] = typeof(MessageActionSuggestedPostSuccess),
|
||||||
[0x69F916F8] = typeof(MessageActionSuggestedPostRefund),
|
[0x69F916F8] = typeof(MessageActionSuggestedPostRefund),
|
||||||
[0xA8A3C699] = typeof(MessageActionGiftTon),
|
[0xA8A3C699] = typeof(MessageActionGiftTon),
|
||||||
|
[0x2C8F2A25] = typeof(MessageActionSuggestBirthday),
|
||||||
[0xD58A08C6] = typeof(Dialog),
|
[0xD58A08C6] = typeof(Dialog),
|
||||||
[0x71BD134C] = typeof(DialogFolder),
|
[0x71BD134C] = typeof(DialogFolder),
|
||||||
[0x2331B22D] = typeof(PhotoEmpty),
|
[0x2331B22D] = typeof(PhotoEmpty),
|
||||||
|
|
@ -240,7 +244,7 @@ namespace TL
|
||||||
[0xB2A2F663] = typeof(GeoPoint),
|
[0xB2A2F663] = typeof(GeoPoint),
|
||||||
[0x5E002502] = typeof(Auth_SentCode),
|
[0x5E002502] = typeof(Auth_SentCode),
|
||||||
[0x2390FE44] = typeof(Auth_SentCodeSuccess),
|
[0x2390FE44] = typeof(Auth_SentCodeSuccess),
|
||||||
[0xD7A2FCF9] = typeof(Auth_SentCodePaymentRequired),
|
[0xE0955A3C] = typeof(Auth_SentCodePaymentRequired),
|
||||||
[0x2EA2C0D4] = typeof(Auth_Authorization),
|
[0x2EA2C0D4] = typeof(Auth_Authorization),
|
||||||
[0x44747E9A] = typeof(Auth_AuthorizationSignUpRequired),
|
[0x44747E9A] = typeof(Auth_AuthorizationSignUpRequired),
|
||||||
[0xB434E2B8] = typeof(Auth_ExportedAuthorization),
|
[0xB434E2B8] = typeof(Auth_ExportedAuthorization),
|
||||||
|
|
@ -254,7 +258,7 @@ namespace TL
|
||||||
[0xF47741F7] = typeof(PeerSettings),
|
[0xF47741F7] = typeof(PeerSettings),
|
||||||
[0xA437C3ED] = typeof(WallPaper),
|
[0xA437C3ED] = typeof(WallPaper),
|
||||||
[0xE0804116] = typeof(WallPaperNoFile),
|
[0xE0804116] = typeof(WallPaperNoFile),
|
||||||
[0xC577B5AD] = typeof(UserFull),
|
[0xA02BC13E] = typeof(UserFull),
|
||||||
[0x145ADE0B] = typeof(Contact),
|
[0x145ADE0B] = typeof(Contact),
|
||||||
[0xC13E3C50] = typeof(ImportedContact),
|
[0xC13E3C50] = typeof(ImportedContact),
|
||||||
[0x16D9703B] = typeof(ContactStatus),
|
[0x16D9703B] = typeof(ContactStatus),
|
||||||
|
|
@ -266,8 +270,8 @@ namespace TL
|
||||||
[0x15BA6C40] = typeof(Messages_Dialogs),
|
[0x15BA6C40] = typeof(Messages_Dialogs),
|
||||||
[0x71E094F3] = typeof(Messages_DialogsSlice),
|
[0x71E094F3] = typeof(Messages_DialogsSlice),
|
||||||
[0xF0E3E596] = typeof(Messages_DialogsNotModified),
|
[0xF0E3E596] = typeof(Messages_DialogsNotModified),
|
||||||
[0x8C718E87] = typeof(Messages_Messages),
|
[0x1D73E7EA] = typeof(Messages_Messages),
|
||||||
[0x762B263D] = typeof(Messages_MessagesSlice),
|
[0x5F206716] = typeof(Messages_MessagesSlice),
|
||||||
[0xC776BA4E] = typeof(Messages_ChannelMessages),
|
[0xC776BA4E] = typeof(Messages_ChannelMessages),
|
||||||
[0x74535F21] = typeof(Messages_MessagesNotModified),
|
[0x74535F21] = typeof(Messages_MessagesNotModified),
|
||||||
[0x64FF9FD5] = typeof(Messages_Chats),
|
[0x64FF9FD5] = typeof(Messages_Chats),
|
||||||
|
|
@ -294,7 +298,7 @@ namespace TL
|
||||||
[0x1F2B0AFD] = typeof(UpdateNewMessage),
|
[0x1F2B0AFD] = typeof(UpdateNewMessage),
|
||||||
[0x4E90BFD6] = typeof(UpdateMessageID),
|
[0x4E90BFD6] = typeof(UpdateMessageID),
|
||||||
[0xA20DB0E5] = typeof(UpdateDeleteMessages),
|
[0xA20DB0E5] = typeof(UpdateDeleteMessages),
|
||||||
[0xC01E857F] = typeof(UpdateUserTyping),
|
[0x2A17BF5C] = typeof(UpdateUserTyping),
|
||||||
[0x83487AF0] = typeof(UpdateChatUserTyping),
|
[0x83487AF0] = typeof(UpdateChatUserTyping),
|
||||||
[0x07761198] = typeof(UpdateChatParticipants),
|
[0x07761198] = typeof(UpdateChatParticipants),
|
||||||
[0xE5BDF8DE] = typeof(UpdateUserStatus),
|
[0xE5BDF8DE] = typeof(UpdateUserStatus),
|
||||||
|
|
@ -311,7 +315,7 @@ namespace TL
|
||||||
[0xEBE46819] = typeof(UpdateServiceNotification),
|
[0xEBE46819] = typeof(UpdateServiceNotification),
|
||||||
[0xEE3B272A] = typeof(UpdatePrivacy),
|
[0xEE3B272A] = typeof(UpdatePrivacy),
|
||||||
[0x05492A13] = typeof(UpdateUserPhone),
|
[0x05492A13] = typeof(UpdateUserPhone),
|
||||||
[0x9C974FDF] = typeof(UpdateReadHistoryInbox),
|
[0x9E84BC99] = typeof(UpdateReadHistoryInbox),
|
||||||
[0x2F2F21BF] = typeof(UpdateReadHistoryOutbox),
|
[0x2F2F21BF] = typeof(UpdateReadHistoryOutbox),
|
||||||
[0x7F891213] = typeof(UpdateWebPage),
|
[0x7F891213] = typeof(UpdateWebPage),
|
||||||
[0xF8227181] = typeof(UpdateReadMessagesContents),
|
[0xF8227181] = typeof(UpdateReadMessagesContents),
|
||||||
|
|
@ -398,8 +402,6 @@ namespace TL
|
||||||
[0x6F7863F4] = typeof(UpdateRecentReactions),
|
[0x6F7863F4] = typeof(UpdateRecentReactions),
|
||||||
[0x86FCCF85] = typeof(UpdateMoveStickerSetToTop),
|
[0x86FCCF85] = typeof(UpdateMoveStickerSetToTop),
|
||||||
[0xD5A41724] = typeof(UpdateMessageExtendedMedia),
|
[0xD5A41724] = typeof(UpdateMessageExtendedMedia),
|
||||||
[0x192EFBE3] = typeof(UpdateChannelPinnedTopic),
|
|
||||||
[0xFE198602] = typeof(UpdateChannelPinnedTopics),
|
|
||||||
[0x20529438] = typeof(UpdateUser),
|
[0x20529438] = typeof(UpdateUser),
|
||||||
[0xEC05B097] = typeof(UpdateAutoSaveSettings),
|
[0xEC05B097] = typeof(UpdateAutoSaveSettings),
|
||||||
[0x75B3B798] = typeof(UpdateStory),
|
[0x75B3B798] = typeof(UpdateStory),
|
||||||
|
|
@ -436,6 +438,10 @@ namespace TL
|
||||||
[0x77B0E372] = typeof(UpdateReadMonoForumInbox),
|
[0x77B0E372] = typeof(UpdateReadMonoForumInbox),
|
||||||
[0xA4A79376] = typeof(UpdateReadMonoForumOutbox),
|
[0xA4A79376] = typeof(UpdateReadMonoForumOutbox),
|
||||||
[0x9F812B08] = typeof(UpdateMonoForumNoPaidException),
|
[0x9F812B08] = typeof(UpdateMonoForumNoPaidException),
|
||||||
|
[0x78C314E0] = typeof(UpdateGroupCallMessage),
|
||||||
|
[0xC957A766] = typeof(UpdateGroupCallEncryptedMessage),
|
||||||
|
[0x683B2C52] = typeof(UpdatePinnedForumTopic),
|
||||||
|
[0xDEF143D0] = typeof(UpdatePinnedForumTopics),
|
||||||
[0xA56C2A3E] = typeof(Updates_State),
|
[0xA56C2A3E] = typeof(Updates_State),
|
||||||
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
|
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
|
||||||
[0x00F49CA0] = typeof(Updates_Difference),
|
[0x00F49CA0] = typeof(Updates_Difference),
|
||||||
|
|
@ -505,6 +511,7 @@ namespace TL
|
||||||
[0xB05AC6B1] = typeof(SendMessageChooseStickerAction),
|
[0xB05AC6B1] = typeof(SendMessageChooseStickerAction),
|
||||||
[0x25972BCB] = typeof(SendMessageEmojiInteraction),
|
[0x25972BCB] = typeof(SendMessageEmojiInteraction),
|
||||||
[0xB665902E] = typeof(SendMessageEmojiInteractionSeen),
|
[0xB665902E] = typeof(SendMessageEmojiInteractionSeen),
|
||||||
|
[0x376D975C] = typeof(SendMessageTextDraftAction),
|
||||||
[0xB3134D9D] = typeof(Contacts_Found),
|
[0xB3134D9D] = typeof(Contacts_Found),
|
||||||
[0x0D09E07B] = typeof(InputPrivacyValueAllowContacts),
|
[0x0D09E07B] = typeof(InputPrivacyValueAllowContacts),
|
||||||
[0x184B35CE] = typeof(InputPrivacyValueAllowAll),
|
[0x184B35CE] = typeof(InputPrivacyValueAllowAll),
|
||||||
|
|
@ -1082,7 +1089,7 @@ namespace TL
|
||||||
[0xC3DFFC04] = typeof(ChatTheme),
|
[0xC3DFFC04] = typeof(ChatTheme),
|
||||||
[0x3458F9C8] = typeof(ChatThemeUniqueGift),
|
[0x3458F9C8] = typeof(ChatThemeUniqueGift),
|
||||||
[0xE011E1C4] = null,//Account_ChatThemesNotModified
|
[0xE011E1C4] = null,//Account_ChatThemesNotModified
|
||||||
[0x16484857] = typeof(Account_ChatThemes),
|
[0xBE098173] = typeof(Account_ChatThemes),
|
||||||
[0x7DBF8673] = typeof(SponsoredMessage),
|
[0x7DBF8673] = typeof(SponsoredMessage),
|
||||||
[0xFFDA656D] = typeof(Messages_SponsoredMessages),
|
[0xFFDA656D] = typeof(Messages_SponsoredMessages),
|
||||||
[0x1839490F] = null,//Messages_SponsoredMessagesEmpty
|
[0x1839490F] = null,//Messages_SponsoredMessagesEmpty
|
||||||
|
|
@ -1135,6 +1142,8 @@ namespace TL
|
||||||
[0xF4997E42] = typeof(InputInvoiceBusinessBotTransferStars),
|
[0xF4997E42] = typeof(InputInvoiceBusinessBotTransferStars),
|
||||||
[0xC39F5324] = typeof(InputInvoiceStarGiftResale),
|
[0xC39F5324] = typeof(InputInvoiceStarGiftResale),
|
||||||
[0x9A0B48B8] = typeof(InputInvoiceStarGiftPrepaidUpgrade),
|
[0x9A0B48B8] = typeof(InputInvoiceStarGiftPrepaidUpgrade),
|
||||||
|
[0x3E77F614] = typeof(InputInvoicePremiumAuthCode),
|
||||||
|
[0x0923D8D1] = typeof(InputInvoiceStarGiftDropOriginalDetails),
|
||||||
[0xAED0CBD9] = typeof(Payments_ExportedInvoice),
|
[0xAED0CBD9] = typeof(Payments_ExportedInvoice),
|
||||||
[0xCFB9D957] = typeof(Messages_TranscribedAudio),
|
[0xCFB9D957] = typeof(Messages_TranscribedAudio),
|
||||||
[0x5334759C] = typeof(Help_PremiumPromo),
|
[0x5334759C] = typeof(Help_PremiumPromo),
|
||||||
|
|
@ -1177,7 +1186,7 @@ namespace TL
|
||||||
[0xFCFEB29C] = typeof(StickerKeyword),
|
[0xFCFEB29C] = typeof(StickerKeyword),
|
||||||
[0xB4073647] = typeof(Username),
|
[0xB4073647] = typeof(Username),
|
||||||
[0x023F109B] = typeof(ForumTopicDeleted),
|
[0x023F109B] = typeof(ForumTopicDeleted),
|
||||||
[0x71701DA9] = typeof(ForumTopic),
|
[0xCDFF0ECA] = typeof(ForumTopic),
|
||||||
[0x367617D3] = typeof(Messages_ForumTopics),
|
[0x367617D3] = typeof(Messages_ForumTopics),
|
||||||
[0x43B46B20] = typeof(DefaultHistoryTTL),
|
[0x43B46B20] = typeof(DefaultHistoryTTL),
|
||||||
[0x41BF109B] = typeof(ExportedContactToken),
|
[0x41BF109B] = typeof(ExportedContactToken),
|
||||||
|
|
@ -1265,6 +1274,8 @@ namespace TL
|
||||||
[0xEDF3ADD0] = typeof(PublicForwardStory),
|
[0xEDF3ADD0] = typeof(PublicForwardStory),
|
||||||
[0x93037E20] = typeof(Stats_PublicForwards),
|
[0x93037E20] = typeof(Stats_PublicForwards),
|
||||||
[0xB54B5ACF] = typeof(PeerColor),
|
[0xB54B5ACF] = typeof(PeerColor),
|
||||||
|
[0xB9C0639A] = typeof(PeerColorCollectible),
|
||||||
|
[0xB8EA86A9] = typeof(InputPeerColorCollectible),
|
||||||
[0x26219A58] = typeof(Help_PeerColorSet),
|
[0x26219A58] = typeof(Help_PeerColorSet),
|
||||||
[0x767D61EB] = typeof(Help_PeerColorProfileSet),
|
[0x767D61EB] = typeof(Help_PeerColorProfileSet),
|
||||||
[0xADEC6EBE] = typeof(Help_PeerColorOption),
|
[0xADEC6EBE] = typeof(Help_PeerColorOption),
|
||||||
|
|
@ -1368,7 +1379,7 @@ namespace TL
|
||||||
[0x94CE852A] = typeof(StarsGiveawayOption),
|
[0x94CE852A] = typeof(StarsGiveawayOption),
|
||||||
[0x54236209] = typeof(StarsGiveawayWinnersOption),
|
[0x54236209] = typeof(StarsGiveawayWinnersOption),
|
||||||
[0x80AC53C3] = typeof(StarGift),
|
[0x80AC53C3] = typeof(StarGift),
|
||||||
[0x1BEFE865] = typeof(StarGiftUnique),
|
[0xB0BF741B] = typeof(StarGiftUnique),
|
||||||
[0xA388A368] = null,//Payments_StarGiftsNotModified
|
[0xA388A368] = null,//Payments_StarGiftsNotModified
|
||||||
[0x2ED82995] = typeof(Payments_StarGifts),
|
[0x2ED82995] = typeof(Payments_StarGifts),
|
||||||
[0x7903E3D9] = typeof(MessageReportOption),
|
[0x7903E3D9] = typeof(MessageReportOption),
|
||||||
|
|
@ -1392,12 +1403,12 @@ namespace TL
|
||||||
[0x13ACFF19] = typeof(StarGiftAttributePattern),
|
[0x13ACFF19] = typeof(StarGiftAttributePattern),
|
||||||
[0xD93D859C] = typeof(StarGiftAttributeBackdrop),
|
[0xD93D859C] = typeof(StarGiftAttributeBackdrop),
|
||||||
[0xE0BFF26C] = typeof(StarGiftAttributeOriginalDetails),
|
[0xE0BFF26C] = typeof(StarGiftAttributeOriginalDetails),
|
||||||
[0x167BD90B] = typeof(Payments_StarGiftUpgradePreview),
|
[0x3DE1DFED] = typeof(Payments_StarGiftUpgradePreview),
|
||||||
[0x62D706B8] = typeof(Users_Users),
|
[0x62D706B8] = typeof(Users_Users),
|
||||||
[0x315A4974] = typeof(Users_UsersSlice),
|
[0x315A4974] = typeof(Users_UsersSlice),
|
||||||
[0x416C56E8] = typeof(Payments_UniqueStarGift),
|
[0x416C56E8] = typeof(Payments_UniqueStarGift),
|
||||||
[0x8C9A88AC] = typeof(Messages_WebPagePreview),
|
[0x8C9A88AC] = typeof(Messages_WebPagePreview),
|
||||||
[0x19A9B572] = typeof(SavedStarGift),
|
[0x8983A452] = typeof(SavedStarGift),
|
||||||
[0x95F389B1] = typeof(Payments_SavedStarGifts),
|
[0x95F389B1] = typeof(Payments_SavedStarGifts),
|
||||||
[0x69279795] = typeof(InputSavedStarGiftUser),
|
[0x69279795] = typeof(InputSavedStarGiftUser),
|
||||||
[0xF101AA7F] = typeof(InputSavedStarGiftChat),
|
[0xF101AA7F] = typeof(InputSavedStarGiftChat),
|
||||||
|
|
@ -1444,6 +1455,7 @@ namespace TL
|
||||||
[0x83268483] = null,//InputChatThemeEmpty
|
[0x83268483] = null,//InputChatThemeEmpty
|
||||||
[0xC93DE95C] = typeof(InputChatTheme),
|
[0xC93DE95C] = typeof(InputChatTheme),
|
||||||
[0x87E5DFE4] = typeof(InputChatThemeUniqueGift),
|
[0x87E5DFE4] = typeof(InputChatThemeUniqueGift),
|
||||||
|
[0x99EA331D] = typeof(StarGiftUpgradePrice),
|
||||||
// from TL.Secret:
|
// from TL.Secret:
|
||||||
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
|
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
|
||||||
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),
|
[0x020DF5D0] = typeof(Layer101.MessageEntityBlockquote),
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,6 @@ namespace TL
|
||||||
{
|
{
|
||||||
public abstract long ID { get; }
|
public abstract long ID { get; }
|
||||||
protected internal abstract IPeerInfo UserOrChat(Dictionary<long, User> users, Dictionary<long, ChatBase> chats);
|
protected internal abstract IPeerInfo UserOrChat(Dictionary<long, User> users, Dictionary<long, ChatBase> chats);
|
||||||
public static implicit operator long(Peer peer) => peer.ID;
|
|
||||||
}
|
}
|
||||||
partial class PeerUser
|
partial class PeerUser
|
||||||
{
|
{
|
||||||
|
|
@ -216,7 +215,7 @@ namespace TL
|
||||||
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/userStatusEmpty">userStatusEmpty</a> = last seen a long time ago, more than a month (or blocked/deleted users)</remarks>
|
/// <remarks>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/userStatusEmpty">userStatusEmpty</a> = last seen a long time ago, more than a month (or blocked/deleted users)</remarks>
|
||||||
partial class UserStatus { internal abstract TimeSpan LastSeenAgo { get; } }
|
partial class UserStatus { internal abstract TimeSpan LastSeenAgo { get; } }
|
||||||
partial class UserStatusOnline { internal override TimeSpan LastSeenAgo => TimeSpan.Zero; }
|
partial class UserStatusOnline { internal override TimeSpan LastSeenAgo => TimeSpan.Zero; }
|
||||||
partial class UserStatusOffline { internal override TimeSpan LastSeenAgo => DateTime.UtcNow - new DateTime((was_online + 62135596800L) * 10000000, DateTimeKind.Utc); }
|
partial class UserStatusOffline { internal override TimeSpan LastSeenAgo => DateTime.UtcNow - was_online; }
|
||||||
/// <remarks>covers anything between 1 second and 2-3 days</remarks>
|
/// <remarks>covers anything between 1 second and 2-3 days</remarks>
|
||||||
partial class UserStatusRecently { internal override TimeSpan LastSeenAgo => TimeSpan.FromDays(1); }
|
partial class UserStatusRecently { internal override TimeSpan LastSeenAgo => TimeSpan.FromDays(1); }
|
||||||
/// <remarks>between 2-3 and seven days</remarks>
|
/// <remarks>between 2-3 and seven days</remarks>
|
||||||
|
|
@ -690,8 +689,8 @@ namespace TL
|
||||||
{
|
{
|
||||||
System.Text.Json.JsonValueKind.True or
|
System.Text.Json.JsonValueKind.True or
|
||||||
System.Text.Json.JsonValueKind.False => new JsonBool { value = elem.GetBoolean() },
|
System.Text.Json.JsonValueKind.False => new JsonBool { value = elem.GetBoolean() },
|
||||||
System.Text.Json.JsonValueKind.Object => new JsonObject { value = elem.EnumerateObject().Select(FromJsonProperty).ToArray() },
|
System.Text.Json.JsonValueKind.Object => new JsonObject { value = [.. elem.EnumerateObject().Select(FromJsonProperty)] },
|
||||||
System.Text.Json.JsonValueKind.Array => new JsonArray { value = elem.EnumerateArray().Select(FromJsonElement).ToArray() },
|
System.Text.Json.JsonValueKind.Array => new JsonArray { value = [.. elem.EnumerateArray().Select(FromJsonElement)] },
|
||||||
System.Text.Json.JsonValueKind.String => new JsonString { value = elem.GetString() },
|
System.Text.Json.JsonValueKind.String => new JsonString { value = elem.GetString() },
|
||||||
System.Text.Json.JsonValueKind.Number => new JsonNumber { value = elem.GetDouble() },
|
System.Text.Json.JsonValueKind.Number => new JsonNumber { value = elem.GetDouble() },
|
||||||
_ => new JsonNull(),
|
_ => new JsonNull(),
|
||||||
|
|
@ -710,7 +709,7 @@ namespace TL
|
||||||
sb.Append(i == 0 ? "" : ",").Append(value[i]);
|
sb.Append(i == 0 ? "" : ",").Append(value[i]);
|
||||||
return sb.Append(']').ToString();
|
return sb.Append(']').ToString();
|
||||||
}
|
}
|
||||||
public object[] ToNativeArray() => value.Select(v => v.ToNative()).ToArray();
|
public object[] ToNativeArray() => [.. value.Select(v => v.ToNative())];
|
||||||
public override object ToNative()
|
public override object ToNative()
|
||||||
{
|
{
|
||||||
if (value.Length == 0) return Array.Empty<object>();
|
if (value.Length == 0) return Array.Empty<object>();
|
||||||
|
|
|
||||||
69
src/TL.cs
69
src/TL.cs
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -16,7 +17,7 @@ namespace TL
|
||||||
#else
|
#else
|
||||||
public interface IObject { }
|
public interface IObject { }
|
||||||
#endif
|
#endif
|
||||||
public interface IMethod<ReturnType> : IObject { }
|
public interface IMethod<out ReturnType> : IObject { }
|
||||||
public interface IPeerResolver { IPeerInfo UserOrChat(Peer peer); }
|
public interface IPeerResolver { IPeerInfo UserOrChat(Peer peer); }
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
|
|
@ -48,6 +49,15 @@ namespace TL
|
||||||
|
|
||||||
public static class Serialization
|
public static class Serialization
|
||||||
{
|
{
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public static byte[] ToBytes<T>(this T obj) where T : IObject
|
||||||
|
{
|
||||||
|
using var ms = new MemoryStream(384);
|
||||||
|
using var writer = new BinaryWriter(ms);
|
||||||
|
writer.WriteTLObject(obj);
|
||||||
|
return ms.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
public static void WriteTLObject<T>(this BinaryWriter writer, T obj) where T : IObject
|
public static void WriteTLObject<T>(this BinaryWriter writer, T obj) where T : IObject
|
||||||
{
|
{
|
||||||
if (obj == null) { writer.WriteTLNull(typeof(T)); return; }
|
if (obj == null) { writer.WriteTLNull(typeof(T)); return; }
|
||||||
|
|
@ -105,6 +115,17 @@ namespace TL
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IMethod<X> ReadTLMethod<X>(this BinaryReader reader)
|
||||||
|
{
|
||||||
|
uint ctorNb = reader.ReadUInt32();
|
||||||
|
if (!Layer.Methods.TryGetValue(ctorNb, out var ctor))
|
||||||
|
throw new WTelegram.WTException($"Cannot find method for ctor #{ctorNb:x}");
|
||||||
|
var method = ctor?.Invoke(reader);
|
||||||
|
if (method is IMethod<bool> && typeof(X) == typeof(object))
|
||||||
|
method = new BoolMethod { query = method };
|
||||||
|
return (IMethod<X>)method;
|
||||||
|
}
|
||||||
|
|
||||||
internal static void WriteTLValue(this BinaryWriter writer, object value, Type valueType)
|
internal static void WriteTLValue(this BinaryWriter writer, object value, Type valueType)
|
||||||
{
|
{
|
||||||
if (value == null)
|
if (value == null)
|
||||||
|
|
@ -197,10 +218,10 @@ namespace TL
|
||||||
foreach (var msg in messages)
|
foreach (var msg in messages)
|
||||||
{
|
{
|
||||||
writer.Write(msg.msg_id);
|
writer.Write(msg.msg_id);
|
||||||
writer.Write(msg.seq_no);
|
writer.Write(msg.seqno);
|
||||||
var patchPos = writer.BaseStream.Position;
|
var patchPos = writer.BaseStream.Position;
|
||||||
writer.Write(0); // patched below
|
writer.Write(0); // patched below
|
||||||
if ((msg.seq_no & 1) != 0)
|
if ((msg.seqno & 1) != 0)
|
||||||
WTelegram.Helpers.Log(1, $" → {msg.body.GetType().Name.TrimEnd('_'),-38} #{(short)msg.msg_id.GetHashCode():X4}");
|
WTelegram.Helpers.Log(1, $" → {msg.body.GetType().Name.TrimEnd('_'),-38} #{(short)msg.msg_id.GetHashCode():X4}");
|
||||||
else
|
else
|
||||||
WTelegram.Helpers.Log(1, $" → {msg.body.GetType().Name.TrimEnd('_'),-38}");
|
WTelegram.Helpers.Log(1, $" → {msg.body.GetType().Name.TrimEnd('_'),-38}");
|
||||||
|
|
@ -222,6 +243,21 @@ namespace TL
|
||||||
writer.WriteTLValue(array.GetValue(i), elementType);
|
writer.WriteTLValue(array.GetValue(i), elementType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static void WriteTLRawVector(this BinaryWriter writer, Array array, int elementSize)
|
||||||
|
{
|
||||||
|
var startPos = writer.BaseStream.Position;
|
||||||
|
int count = array.Length;
|
||||||
|
var elementType = array.GetType().GetElementType();
|
||||||
|
for (int i = count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
writer.BaseStream.Position = startPos + i * elementSize;
|
||||||
|
writer.WriteTLValue(array.GetValue(i), elementType);
|
||||||
|
}
|
||||||
|
writer.BaseStream.Position = startPos;
|
||||||
|
writer.Write(count);
|
||||||
|
writer.BaseStream.Position = startPos + count * elementSize + 4;
|
||||||
|
}
|
||||||
|
|
||||||
internal static List<T> ReadTLRawVector<T>(this BinaryReader reader, uint ctorNb)
|
internal static List<T> ReadTLRawVector<T>(this BinaryReader reader, uint ctorNb)
|
||||||
{
|
{
|
||||||
int count = reader.ReadInt32();
|
int count = reader.ReadInt32();
|
||||||
|
|
@ -289,13 +325,14 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void WriteTLStamp(this BinaryWriter writer, DateTime datetime)
|
internal static void WriteTLStamp(this BinaryWriter writer, DateTime datetime)
|
||||||
=> writer.Write(datetime == DateTime.MaxValue ? int.MaxValue : (int)(datetime.ToUniversalTime().Ticks / 10000000 - 62135596800L));
|
=> writer.Write((int)Math.Min(Math.Max(datetime.ToUniversalTime().Ticks / 10000000 - 62135596800L, 0), int.MaxValue));
|
||||||
|
|
||||||
internal static DateTime ReadTLStamp(this BinaryReader reader)
|
internal static DateTime ReadTLStamp(this BinaryReader reader) => reader.ReadInt32() switch
|
||||||
{
|
{
|
||||||
int unixstamp = reader.ReadInt32();
|
<= 0 => default,
|
||||||
return unixstamp == int.MaxValue ? DateTime.MaxValue : new((unixstamp + 62135596800L) * 10000000, DateTimeKind.Utc);
|
int.MaxValue => DateTime.MaxValue,
|
||||||
}
|
int unixstamp => new((unixstamp + 62135596800L) * 10000000, DateTimeKind.Utc)
|
||||||
|
};
|
||||||
|
|
||||||
internal static void WriteTLString(this BinaryWriter writer, string str)
|
internal static void WriteTLString(this BinaryWriter writer, string str)
|
||||||
{
|
{
|
||||||
|
|
@ -428,10 +465,10 @@ namespace TL
|
||||||
}
|
}
|
||||||
|
|
||||||
[TLDef(0x5BB8E511)] //message#5bb8e511 msg_id:long seqno:int bytes:int body:Object = Message
|
[TLDef(0x5BB8E511)] //message#5bb8e511 msg_id:long seqno:int bytes:int body:Object = Message
|
||||||
public sealed partial class _Message(long msgId, int seqNo, IObject obj) : IObject
|
public sealed partial class _Message(long msgId, int seqno, IObject obj) : IObject
|
||||||
{
|
{
|
||||||
public long msg_id = msgId;
|
public long msg_id = msgId;
|
||||||
public int seq_no = seqNo;
|
public int seqno = seqno;
|
||||||
public int bytes;
|
public int bytes;
|
||||||
public IObject body = obj;
|
public IObject body = obj;
|
||||||
}
|
}
|
||||||
|
|
@ -443,4 +480,16 @@ namespace TL
|
||||||
|
|
||||||
[TLDef(0x3072CFA1)] //gzip_packed#3072cfa1 packed_data:bytes = Object
|
[TLDef(0x3072CFA1)] //gzip_packed#3072cfa1 packed_data:bytes = Object
|
||||||
public sealed partial class GzipPacked : IObject { public byte[] packed_data; }
|
public sealed partial class GzipPacked : IObject { public byte[] packed_data; }
|
||||||
|
|
||||||
|
public sealed class Null<X> : IObject
|
||||||
|
{
|
||||||
|
public readonly static Null<X> Instance = new();
|
||||||
|
public void WriteTL(BinaryWriter writer) => writer.WriteTLNull(typeof(X));
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class BoolMethod : IMethod<object>
|
||||||
|
{
|
||||||
|
public IObject query;
|
||||||
|
public void WriteTL(BinaryWriter writer) => query.WriteTL(writer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -566,7 +566,7 @@ namespace WTelegram
|
||||||
|
|
||||||
/// <summary>Save the current state of the manager to JSON file</summary>
|
/// <summary>Save the current state of the manager to JSON file</summary>
|
||||||
/// <param name="statePath">File path to write</param>
|
/// <param name="statePath">File path to write</param>
|
||||||
/// <remarks>Note: This does not save the the content of collected Users/Chats dictionaries</remarks>
|
/// <remarks>Note: This does not save the content of collected Users/Chats dictionaries</remarks>
|
||||||
public void SaveState(string statePath)
|
public void SaveState(string statePath)
|
||||||
=> System.IO.File.WriteAllText(statePath, System.Text.Json.JsonSerializer.Serialize(State, Helpers.JsonOptions));
|
=> System.IO.File.WriteAllText(statePath, System.Text.Json.JsonSerializer.Serialize(State, Helpers.JsonOptions));
|
||||||
public static Dictionary<long, MBoxState> LoadState(string statePath) => !System.IO.File.Exists(statePath) ? null
|
public static Dictionary<long, MBoxState> LoadState(string statePath) => !System.IO.File.Exists(statePath) ? null
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,11 @@
|
||||||
<PackageId>WTelegramClient</PackageId>
|
<PackageId>WTelegramClient</PackageId>
|
||||||
<Authors>Wizou</Authors>
|
<Authors>Wizou</Authors>
|
||||||
<VersionPrefix>0.0.0</VersionPrefix>
|
<VersionPrefix>0.0.0</VersionPrefix>
|
||||||
<VersionSuffix>layer.214</VersionSuffix>
|
<VersionSuffix>layer.216</VersionSuffix>
|
||||||
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 214
|
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 216
|
||||||
|
|
||||||
Release Notes:
|
Release Notes:
|
||||||
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>
|
$(ReleaseNotes)</Description>
|
||||||
<Copyright>Copyright © Olivier Marcoux 2021-2025</Copyright>
|
<Copyright>Copyright © Olivier Marcoux 2021-2025</Copyright>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<PackageProjectUrl>https://wiz0u.github.io/WTelegramClient</PackageProjectUrl>
|
<PackageProjectUrl>https://wiz0u.github.io/WTelegramClient</PackageProjectUrl>
|
||||||
|
|
@ -27,7 +27,7 @@ $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%
|
||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<PackageTags>Telegram;MTProto;Client;Api;UserBot</PackageTags>
|
<PackageTags>Telegram;MTProto;Client;Api;UserBot</PackageTags>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<PackageReleaseNotes>$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</PackageReleaseNotes>
|
<PackageReleaseNotes>$(ReleaseNotes)</PackageReleaseNotes>
|
||||||
<NoWarn>NETSDK1138;CS0419;CS1573;CS1591</NoWarn>
|
<NoWarn>NETSDK1138;CS0419;CS1573;CS1591</NoWarn>
|
||||||
<DefineConstants>TRACE;OBFUSCATION;MTPG</DefineConstants>
|
<DefineConstants>TRACE;OBFUSCATION;MTPG</DefineConstants>
|
||||||
<!--<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>-->
|
<!--<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>-->
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue