Search Results for

    Show / Hide Table of Contents

    Class ComponentInteractionHandler

    Handles all incoming component interactions requests.

    Inheritance
    System.Object
    ComponentInteractionHandler
    Implements
    IComponentInteractionHandler
    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.InteractionHandlers
    Assembly: Color-Chan.Discord.Commands.dll
    Syntax
    public class ComponentInteractionHandler : IComponentInteractionHandler

    Constructors

    | Improve this Doc View Source

    ComponentInteractionHandler(ILogger<ComponentInteractionHandler>, IServiceProvider, IComponentService, IOptions<ComponentInteractionConfiguration>, IDiscordRestGuild, IDiscordRestChannel, IDiscordRestApplication)

    Initializes a new instance of ComponentInteractionHandler.

    Declaration
    public ComponentInteractionHandler(ILogger<ComponentInteractionHandler> logger, IServiceProvider serviceProvider, IComponentService componentService, IOptions<ComponentInteractionConfiguration> options, IDiscordRestGuild restGuild, IDiscordRestChannel restChannel, IDiscordRestApplication application)
    Parameters
    Type Name Description
    Microsoft.Extensions.Logging.ILogger<ComponentInteractionHandler> logger

    The Microsoft.Extensions.Logging.ILogger for ComponentInteractionHandler.

    System.IServiceProvider serviceProvider

    The services needed to execute the component interactions.

    IComponentService componentService

    The IComponentService used to search and execute the correct components.

    Microsoft.Extensions.Options.IOptions<ComponentInteractionConfiguration> options

    The ComponentInteractionConfiguration containing the configuration data for component interactions.

    IDiscordRestGuild restGuild

    The rest class for Guilds.

    IDiscordRestChannel restChannel

    The rest class for Channels.

    IDiscordRestApplication application

    The rest class the Application calls.

    Methods

    | Improve this Doc View Source

    HandleComponentInteractionAsync(IDiscordInteraction)

    Handles a component interaction request.

    Declaration
    public async Task<InternalInteractionResponse> HandleComponentInteractionAsync(IDiscordInteraction interaction)
    Parameters
    Type Name Description
    IDiscordInteraction interaction

    The IDiscordInteraction that was requested.

    Returns
    Type Description
    System.Threading.Tasks.Task<InternalInteractionResponse>

    A InternalInteractionResponse containing the result of the component interaction.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the Data is null.

    System.NullReferenceException

    Thrown when no user or member was found.

    ComponentInteractionResultException

    Thrown when no channel id was found.

    Implements

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