Represents a Command Interaction.

Type Parameters

Hierarchy (view full)

  • Base<string>
    • CommandInteraction

Constructors

Properties

_lastMessageID: null | string

ID of the last message created with this interaction.

acknowledged: boolean

Interaction acknowledgement.

channelID: string

ID of the channel on which the interaction was sent.

client: Client

App's client.

createdAt: Date

When the interaction was created.

Interaction Data

guildID: string

ID of the server on which the interaction was sent.

id: string

Item ID

isPrivate: boolean

If true, the interaction appears as private.

isSilent: boolean

If true, the interaction didn't mention anyone.

memberID: string

ID of the interaction author.

originalID: null | string

ID of the original message, responding to this interaction.

replyMessageIDs: string[]

The IDs of the message replied by the interaction.

Accessors

  • get member(): T extends Guild
        ? Member
        : undefined | Member | Promise<Member>
  • Retrieve interaction message's member.

    Make sure to await this property (getter) to still get results even if the member is not cached.

    Returns T extends Guild
        ? Member
        : undefined | Member | Promise<Member>

    The API does not provide member information, that's why you might need to await this property.

Methods

  • Create a follow-up message that replies to the original response. (use CommandInteraction#createMessage if the interaction has not been acknowledged).

    Parameters

    Returns Promise<Message<T>>

  • This method is used to create a message following this interaction (use CommandInteraction#createFollowup on already acknowledged interactions).

    Parameters

    Returns Promise<Message<T>>

  • Edit followup message.

    Parameters

    Returns Promise<Message<T>>

  • Edit the last message sent with the interaction.

    Parameters

    Returns Promise<Message<T>>

  • Edit the interaction's original response message.

    Parameters

    • newMessage: {
          content?: string;
          embeds?: Embed[];
      }

      New message's options.

      • Optionalcontent?: string
      • Optionalembeds?: Embed[]

    Returns Promise<Message<T>>

  • Get followup message.

    Returns Promise<Message<T>>

  • Get the latest message sent with this interaction.

    Returns Promise<Message<T>>

  • Get the original message response.

    Returns Promise<Message<T>>