@tanzanite/discord-akairo
    Preparing search index...

    Class CommandUtil<MessageType>

    Command utilities.

    Type Parameters

    Index

    Constructors

    Properties

    The command handler.

    isSlash: boolean

    Whether or not the command is a slash command.

    lastResponse: null | Message<boolean>

    The last response sent.

    message: MessageType

    Message that triggered the command.

    messages: null | Collection<string, Message<boolean>>

    Messages stored from prompts and prompt replies.

    parsed: null | ParsedComponentData

    The parsed components.

    shouldEdit: boolean

    Whether or not the last response should be edited.

    deletedMessages: Set<string> = ...

    Saved deleted message ids.

    Accessors

    Methods

    • Adds client prompt or user reply to messages.

      Parameters

      • message: Message

        Message to add.

      Returns Message

    • Adds client prompt or user reply to messages.

      Parameters

      • message: Message<boolean>[]

        Message to add.

      Returns Message<boolean>[]

    • Edits the last response. If the message is a slash command, edits the slash response.

      Parameters

      • options: string | MessagePayload | MessageEditOptions

        Options to use.

      Returns Promise<Message<boolean>>

    • Edits the last response. If the message is a slash command, edits the slash response.

      Parameters

      • options: string | MessagePayload | InteractionEditReplyOptions

        Options to use.

      Returns Promise<Message<boolean>>

    • Send an inline reply or respond to a slash command. If the message is a slash command, it replies or edits the last reply.

      Parameters

      • options: string | MessagePayload | MessageReplyOptions

        Options to use.

      Returns Promise<Message<boolean>>

    • Send an inline reply or respond to a slash command. If the message is a slash command, it replies or edits the last reply.

      Parameters

      • options: string | MessagePayload | InteractionReplyOptions

        Options to use.

      Returns Promise<Message<boolean>>

    • Sends a response or edits an old response if available.

      Parameters

      • options: string | MessagePayload | MessageCreateOptions

        Options to use.

      Returns Promise<Message<boolean>>

    • Sends a response or edits an old response if available.

      Parameters

      • options: string | MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions

        Options to use.

      Returns Promise<Message<boolean>>

    • Sends a response, overwriting the last response.

      Parameters

      • options: string | MessagePayload | MessageCreateOptions

        Options to use.

      Returns Promise<Message<boolean>>

    • Sends a response, overwriting the last response.

      Parameters

      • options: string | MessagePayload | InteractionReplyOptions

        Options to use.

      Returns Promise<Message<boolean>>