Search Results for

    Show / Hide Table of Contents

    Class TypeReader<T>

    Base class for creating TypeConverters. InteractionService uses TypeConverters to interface with Slash Command parameters.

    Inheritance
    Object
    TypeReader
    TypeReader<T>
    Inherited Members
    TypeReader.ReadAsync(IInteractionContext, String, IServiceProvider)
    TypeReader.SerializeAsync(Object, IServiceProvider)
    Namespace: Discord.Interactions
    Assembly: Discord.Net.Interactions.dll
    Syntax
    public abstract class TypeReader<T> : TypeReader, ITypeConverter<string>
    Type Parameters
    Name Description
    T

    Methods

    | Improve this Doc View Source

    CanConvertTo(Type)

    Will be used to search for alternative TypeReaders whenever the Command Service encounters an unknown parameter type.

    Declaration
    public sealed override bool CanConvertTo(Type type)
    Parameters
    Type Name Description
    Type type

    An object type.

    Returns
    Type Description
    Boolean

    The boolean result.

    Overrides
    TypeReader.CanConvertTo(Type)

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.7.2