Search Results for

    Show / Hide Table of Contents

    Class SlashCommandOptionBuildService

    Holds all methods to build ISlashCommandOptionInfos for ISlashCommandInfos.

    Inheritance
    System.Object
    SlashCommandOptionBuildService
    Implements
    ISlashCommandOptionBuildService
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Color_Chan.Discord.Commands.Services.Implementations.Builders
    Assembly: Color-Chan.Discord.Commands.dll
    Syntax
    public class SlashCommandOptionBuildService : ISlashCommandOptionBuildService

    Constructors

    | Improve this Doc View Source

    SlashCommandOptionBuildService(ILogger<SlashCommandOptionBuildService>)

    Initializes a new instance of SlashCommandOptionBuildService.

    Declaration
    public SlashCommandOptionBuildService(ILogger<SlashCommandOptionBuildService> logger)
    Parameters
    Type Name Description
    Microsoft.Extensions.Logging.ILogger<SlashCommandOptionBuildService> logger

    The Microsoft.Extensions.Logging.ILogger for SlashCommandOptionBuildService.

    Methods

    | Improve this Doc View Source

    BuildSlashCommandsOptions(IEnumerable<ISlashCommandOptionInfo>)

    Builds a System.Collections.Generic.IEnumerable<T> of DiscordApplicationCommandOptionDatas from ISlashCommandInfos.

    Declaration
    public IEnumerable<DiscordApplicationCommandOptionData> BuildSlashCommandsOptions(IEnumerable<ISlashCommandOptionInfo> commandOptionInfos)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<ISlashCommandOptionInfo> commandOptionInfos

    The ISlashCommandInfo that will be converted to DiscordApplicationCommandOptionData.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<DiscordApplicationCommandOptionData>

    The generated System.Collections.Generic.IEnumerable<T> of DiscordApplicationCommandOptionDatas

    Exceptions
    Type Condition
    UpdateSlashCommandException

    Thrown when the command exceeds the maximum allowed options.

    | Improve this Doc View Source

    GetCommandOptions(MethodInfo)

    Get all all the data from the parameters with the SlashCommandOptionAttribute.

    Declaration
    public IEnumerable<ISlashCommandOptionInfo> GetCommandOptions(MethodInfo command)
    Parameters
    Type Name Description
    System.Reflection.MethodInfo command

    The System.Reflection.MethodInfo that will be used to find the parameters.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<ISlashCommandOptionInfo>

    A System.Collections.Generic.IEnumerable<T> of ISlashCommandOptionInfo containing all the data for the options.

    Implements

    ISlashCommandOptionBuildService
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX