From 82fe3813a660a4d5c949d548823a6a207a8e729f Mon Sep 17 00:00:00 2001 From: Filip Strajnar Date: Sun, 16 Jun 2024 10:40:39 +0200 Subject: [PATCH] Limit is no longer necessary. --- DiscordClient/DiscordUserClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DiscordClient/DiscordUserClient.cs b/DiscordClient/DiscordUserClient.cs index 6f9c33c..5cad50c 100644 --- a/DiscordClient/DiscordUserClient.cs +++ b/DiscordClient/DiscordUserClient.cs @@ -22,11 +22,11 @@ public class DiscordUserClient public async Task<( HttpResponseMessage Response, MessageSearchResponse? JsonData - )> GetChannelMessages(string channelId, int offset = 0, string? authorId = null, int limit = 50) + )> GetChannelMessages(string channelId, int offset = 0, string? authorId = null) { string authorQuery = authorId is not null ? $"&author_id={authorId}" : ""; string url = - $"https://discord.com/api/v9/channels/{channelId}/messages/search?limit={limit}&offset={offset}{authorQuery}"; + $"https://discord.com/api/v9/channels/{channelId}/messages/search?offset={offset}{authorQuery}"; HttpResponseMessage response = await _httpClient.GetAsync(url); return (response, await response.Content.ReadFromJsonAsync()); }