Search Results for

    Show / Hide Table of Contents

    Class ApplicationCommandRequireOwnerOrIdAttribute

    Requires ownership of the bot or a whitelisted id to execute this command.

    Inheritance
    System.Object
    System.Attribute
    SlashCheckBaseAttribute
    ApplicationCommandRequireOwnerOrIdAttribute
    Namespace: DisCatSharp.ApplicationCommands.Attributes
    Assembly: DisCatSharp.ApplicationCommands.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false)]
    public sealed class ApplicationCommandRequireOwnerOrIdAttribute : SlashCheckBaseAttribute

    Constructors

    | Improve this Doc View Source

    ApplicationCommandRequireOwnerOrIdAttribute(UInt64[])

    Defines that usage of this command is restricted to the owner or whitelisted ids of the bot.

    Declaration
    public ApplicationCommandRequireOwnerOrIdAttribute(params ulong[] userIds)
    Parameters
    Type Name Description
    System.UInt64[] userIds

    List of allowed user ids

    Properties

    | Improve this Doc View Source

    UserIds

    Allowed user ids

    Declaration
    public IReadOnlyList<ulong> UserIds { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<System.UInt64>

    Methods

    | Improve this Doc View Source

    ExecuteChecksAsync(InteractionContext)

    Executes the a check.

    Declaration
    public override Task<bool> ExecuteChecksAsync(InteractionContext ctx)
    Parameters
    Type Name Description
    InteractionContext ctx

    The command context.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>
    Overrides
    SlashCheckBaseAttribute.ExecuteChecksAsync(InteractionContext)

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems