From 44ac70a77ac3ddd0453b4e743bd8126fe4ecbf5d Mon Sep 17 00:00:00 2001 From: emorell96 Date: Tue, 23 Mar 2021 22:34:47 -0700 Subject: [PATCH] added the clientId, and clientSecret parameters to the construction of the DiscordRestApiClient --- src/Discord.Net.Rest/DiscordRestClient.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Discord.Net.Rest/DiscordRestClient.cs b/src/Discord.Net.Rest/DiscordRestClient.cs index 48c40fdfa..a4c4b18b2 100644 --- a/src/Discord.Net.Rest/DiscordRestClient.cs +++ b/src/Discord.Net.Rest/DiscordRestClient.cs @@ -32,7 +32,9 @@ namespace Discord.Rest => new API.DiscordRestApiClient(config.RestClientProvider, DiscordRestConfig.UserAgent, rateLimitPrecision: config.RateLimitPrecision, - useSystemClock: config.UseSystemClock); + useSystemClock: config.UseSystemClock, + clientId: config.ClientId, + clientSecret: config.ClientSecret); internal override void Dispose(bool disposing) { @@ -60,6 +62,10 @@ namespace Discord.Rest { return _applicationInfo ?? (_applicationInfo = await ClientHelper.GetApplicationInfoAsync(this, options).ConfigureAwait(false)); } + public async Task GetTokenAsync(TokenType tokenType, string token, string redirectUrl, IEnumerable scopes, RequestOptions options = null) + { + return await ClientHelper.GetTokenAsync(this, tokenType, token, redirectUrl, scopes, options); + } public Task GetChannelAsync(ulong id, RequestOptions options = null) => ClientHelper.GetChannelAsync(this, id, options);