mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-01-09 18:21:44 +01:00
detect wrong usage of GetMessages
This commit is contained in:
parent
4b7205cb68
commit
88e2f5d71e
2
.github/dev.yml
vendored
2
.github/dev.yml
vendored
|
|
@ -1,7 +1,7 @@
|
|||
pr: none
|
||||
trigger: [ master ]
|
||||
|
||||
name: 3.5.6-dev.$(Rev:r)
|
||||
name: 3.5.7-dev.$(Rev:r)
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -667,6 +667,10 @@ namespace WTelegram
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>If you want to get all messages from a chat, use method Messages_GetHistory</summary>
|
||||
public Task<Messages_MessagesBase> GetMessages(InputPeer peer)
|
||||
=> throw new WTException("If you want to get all messages from a chat, use method Messages_GetHistory");
|
||||
|
||||
/// <summary>Generic helper: Get individual messages by IDs [bots: ✓] <para>See <a href="https://corefork.telegram.org/method/messages.getMessages"/><br/> and <a href="https://corefork.telegram.org/method/channels.getMessages"/></para> <para>Possible <see cref="RpcException"/> codes: 400</para></summary>
|
||||
/// <param name="peer">User/Chat/Channel</param>
|
||||
/// <param name="id">IDs of messages to get</param>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace TL
|
|||
public static Task<Messages_Chats> Messages_GetChats(this Client _) => throw new WTException("The method you're looking for is Messages_GetAllChats");
|
||||
public static Task<Messages_Chats> Channels_GetChannels(this Client _) => throw new WTException("The method you're looking for is Messages_GetAllChats");
|
||||
public static Task<UserBase[]> Users_GetUsers(this Client _) => throw new WTException("The method you're looking for is Messages_GetAllDialogs");
|
||||
public static Task<Messages_MessagesBase> Messages_GetMessages(this Client _) => throw new WTException("If you want to get the messages from a chat, use Messages_GetHistory");
|
||||
public static Task<Messages_MessagesBase> Messages_GetMessages(this Client _) => throw new WTException("If you want to get all messages from a chat, use method Messages_GetHistory");
|
||||
}
|
||||
|
||||
public static class Markdown
|
||||
|
|
|
|||
Loading…
Reference in a new issue