From 14b263f3bd0a35e951ea0fc5eec56deb823fec73 Mon Sep 17 00:00:00 2001 From: Hsu Still <341464@gmail.com> Date: Mon, 9 Apr 2018 11:28:02 +0800 Subject: [PATCH] Change with_counts REST behaviour --- src/Discord.Net.Rest/DiscordRestApiClient.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Rest/DiscordRestApiClient.cs b/src/Discord.Net.Rest/DiscordRestApiClient.cs index 92e4665e5..954ce0164 100644 --- a/src/Discord.Net.Rest/DiscordRestApiClient.cs +++ b/src/Discord.Net.Rest/DiscordRestApiClient.cs @@ -910,9 +910,11 @@ namespace Discord.API if (index >= 0) inviteId = inviteId.Substring(index + 1); + var withCounts = args.WithCounts.GetValueOrDefault(false); + try { - return await SendJsonAsync("GET", () => $"invites/{inviteId}", args, new BucketIds(), options: options).ConfigureAwait(false); + return await SendAsync("GET", () => $"invites/{inviteId}?with_counts={withCounts}", new BucketIds(), options: options).ConfigureAwait(false); } catch (HttpException ex) when (ex.HttpCode == HttpStatusCode.NotFound) { return null; } }