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

    Class AkairoMessage<Cached>

    A command interaction represented as a message.

    Type Parameters

    • Cached extends CacheType = CacheType

    Hierarchy

    • Base
      • AkairoMessage
    Index

    Constructors

    Properties

    applicationId: string

    The application's id

    author: User

    The author of the interaction.

    channelId: string

    The id of the channel this interaction was sent in

    client: Client<true>

    The client that instantiated this

    content: string

    The command name and arguments represented as a string.

    createdTimestamp: number

    The timestamp the interaction was sent at.

    guildId: CacheTypeReducer<Cached, string, string, string, null | string>

    The id of the guild this interaction was sent in

    id: string

    The ID of the interaction.

    interaction: ChatInputCommandInteraction<Cached>

    The command interaction.

    member: CacheTypeReducer<
        Cached,
        GuildMember,
        APIInteractionGuildMember,
        APIInteractionGuildMember
        | GuildMember,
        null | APIInteractionGuildMember | GuildMember,
    >

    Represents the author of the interaction as a guild member. Only available if the interaction comes from a guild where the author is still a member.

    partial: false

    Whether or not this message is a partial

    util: CommandUtil<AkairoMessage<CacheType>>

    Utilities for command responding.

    Accessors

    • get channel(): CacheTypeReducer<
          Cached,
          null
          | GuildTextBasedChannel,
          null | GuildTextBasedChannel,
          null | GuildTextBasedChannel,
          null | TextBasedChannel,
      >

      The channel that the interaction was sent in.

      Returns CacheTypeReducer<
          Cached,
          null
          | GuildTextBasedChannel,
          null | GuildTextBasedChannel,
          null | GuildTextBasedChannel,
          null | TextBasedChannel,
      >

    • get cleanContent(): null | string

      The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name, the relevant mention in the message content will not be converted.

      Returns null | string

    • get guild(): CacheTypeReducer<Cached, Guild, null, null | Guild, null | Guild>

      The guild the interaction was sent in (if in a guild channel).

      Returns CacheTypeReducer<Cached, Guild, null, null | Guild, null | Guild>

    Methods

    • Replies or edits the reply of the slash command.

      Parameters

      • options: string | MessagePayload | InteractionReplyOptions

        The options to edit the reply.

      Returns Promise<Message<boolean>>

    • Transforms the class to a plain object.

      Parameters

      • ...props: Record<string, string | boolean>[]

      Returns unknown

    • Returns the id of this object.

      Returns string