Browse Source

added the clientId, and clientSecret parameters to the construction of the DiscordRestApiClient

pull/1806/head
emorell96 4 years ago
parent
commit
44ac70a77a
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/Discord.Net.Rest/DiscordRestClient.cs

+ 7
- 1
src/Discord.Net.Rest/DiscordRestClient.cs View File

@@ -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<RestToken> GetTokenAsync(TokenType tokenType, string token, string redirectUrl, IEnumerable<string> scopes, RequestOptions options = null)
{
return await ClientHelper.GetTokenAsync(this, tokenType, token, redirectUrl, scopes, options);
}

public Task<RestChannel> GetChannelAsync(ulong id, RequestOptions options = null)
=> ClientHelper.GetChannelAsync(this, id, options);


Loading…
Cancel
Save