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);