Skip to main content

Class ChannelTypeReader<T>

A Discord.Commands.TypeReader for parsing objects implementing Discord.IChannel.

Assembly: Discord.Net.Commands.dll​
View Source​
Declaration
public class ChannelTypeReader<T> : TypeReader where T : class, IChannel

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 override async 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.