Skip to main content

Class TypeReader

Defines a reader class that parses user input into a specified type.

Assembly: Discord.Net.Commands.dll​
View Source​
Declaration
public abstract class TypeReader

Methods​

ReadAsync(ICommandContext, String, IServiceProvider)​

Attempts to parse the <code data-dev-comment-type="paramref" class="paramref">input</code> into the desired type.

View Source​
Declaration
public abstract Task<TypeReaderResult> ReadAsync(ICommandContext context, string input, IServiceProvider services)
Returns​

System.Threading.Tasks.Task<Discord.Commands.TypeReaderResult>: A task that represents the asynchronous parsing operation. The task result contains the parsing result.

Parameters​
TypeNameDescription
Discord.Commands.ICommandContextcontextThe context of the command.
System.StringinputThe raw input of the command.
System.IServiceProviderservicesThe service collection used for dependency injection.