Browse Source

Changes regarding the removal of the user tokentype

pull/1849/head
Paulo 4 years ago
parent
commit
a372df45c6
2 changed files with 0 additions and 3 deletions
  1. +0
    -1
      src/Discord.Net.Rest/DiscordRestApiClient.cs
  2. +0
    -2
      test/Discord.Net.Tests.Unit/TokenUtilsTests.cs

+ 0
- 1
src/Discord.Net.Rest/DiscordRestApiClient.cs View File

@@ -79,7 +79,6 @@ namespace Discord.API
{
return tokenType switch
{
default(TokenType) => token,
TokenType.Bot => $"Bot {token}",
TokenType.Bearer => $"Bearer {token}",
_ => throw new ArgumentException(message: "Unknown OAuth token type.", paramName: nameof(tokenType)),


+ 0
- 2
test/Discord.Net.Tests.Unit/TokenUtilsTests.cs View File

@@ -127,8 +127,6 @@ namespace Discord
/// The <see cref="TokenType.User"/> type is treated as an invalid <see cref="TokenType"/>.
/// </remarks>
[Theory]
// TokenType.User
[InlineData(0)]
// out of range TokenType
[InlineData(-1)]
[InlineData(4)]


Loading…
Cancel
Save