Table of Contents

Class TokenUtils

Namespace
Discord
Assembly
Discord.Net.Core.dll

Provides a series of helper methods for handling Discord login tokens.

public static class TokenUtils
Inheritance
TokenUtils
Inherited Members

Methods

ValidateToken(TokenType, string)

Checks the validity of the supplied token of a specific type.

public static void ValidateToken(TokenType tokenType, string token)

Parameters

tokenType TokenType

The type of token to validate.

token string

The token value to validate.

Exceptions

ArgumentNullException

Thrown when the supplied token string is null, empty, or contains only whitespace.

ArgumentException

Thrown when the supplied TokenType or token value is invalid.