Search Results for

    Show / Hide Table of Contents

    Class InteractionRequirementService

    Holds all the methods to execute all InteractionRequirementAttributes for a slash command.

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

    Constructors

    | Improve this Doc View Source

    InteractionRequirementService(ILogger<InteractionRequirementService>)

    Initializes a new instance of InteractionRequirementService.

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

    The Microsoft.Extensions.Logging.ILogger for InteractionRequirementService.

    Methods

    | Improve this Doc View Source

    ExecuteRequirementsAsync(IEnumerable<InteractionRequirementAttribute>, IInteractionContext, IServiceProvider)

    Executes all InteractionRequirementAttributes for a ISlashCommandInfo.

    Declaration
    public async Task<Result> ExecuteRequirementsAsync(IEnumerable<InteractionRequirementAttribute> requirements, IInteractionContext context, IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<InteractionRequirementAttribute> requirements

    The requirements that will be executed.

    IInteractionContext context

    The IInteractionContext containing the current data for the command.

    System.IServiceProvider serviceProvider

    The System.IServiceProvider containing the dependencies for the InteractionRequirementAttributes.

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

    The Result containing the result of executing the slash command requirements.

    Implements

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