Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Message

Hierarchy

Index

Constructors

Properties

client: Client

The client that instantiated this structure

Raw message data

Accessors

  • get applicationId(): undefined | string
  • The Id of the application of the interaction that sent this message, if any

    Returns undefined | string

  • The author of the message

    Returns User

  • The Channel that the message belongs to

    Returns undefined | Channel

  • get channelId(): string
  • Theof the channel the message is in

    Returns string

  • The components of this message

    Returns ActionRowBuilder[]

  • get content(): string
  • The message's content

    Returns string

  • Returns EmbedBuilder[]

  • get flags(): undefined | "Crossposted" | "IsCrosspost" | "SuppressEmbeds" | "SourceMessageDeleted" | "Urgent" | "HasThread" | "Ephemeral" | "Loading" | "FailedToMentionSomeRolesInThread"
  • The flags of the message

    Returns undefined | "Crossposted" | "IsCrosspost" | "SuppressEmbeds" | "SourceMessageDeleted" | "Urgent" | "HasThread" | "Ephemeral" | "Loading" | "FailedToMentionSomeRolesInThread"

  • get guild(): undefined | Guild
  • The Guild that the message belongs to

    Returns undefined | Guild

  • get guildId(): undefined | string
  • Theof the guild the message is in

    Returns undefined | string

  • get id(): string
  • The message's Id

    Returns string

  • Represents the author of the message as a guild member.

    Returns undefined | GuildMember

  • Message reference data

    Returns undefined | MessageReference

  • get nonce(): undefined | string | number
  • A random number or string used for checking message delivery

    Returns undefined | string | number

  • get pinned(): boolean
  • Whether or not this message is pinned

    Returns boolean

  • The numeric type of the channel

    Returns MessageType

  • get system(): boolean
  • Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)

    Returns boolean

  • get tts(): boolean
  • Whether or not the message was Text-To-Speech

    Returns boolean

  • get type(): string
  • The type of the message

    Returns string

  • get url(): string
  • The URL to jump to this message

    Returns string

  • get webhookId(): undefined | string
  • The id of the webhook that sent the message, if applicable

    Returns undefined | string

Methods

  • clone(): any
  • Returns any

  • Fetches the webhook used to create this message.

    Returns Promise<Webhook>

  • Replies to the message

    example
    const { EmbedBuilder } = require('helly');
    const embed = new EmbedBuilder().setTitle('Pong!')
    message.reply({ embeds: [embed] })
    example
    const { EmbedBuilder } = require('helly');
    const embed = new EmbedBuilder().setTitle('Pong!')
    message.reply({ content: 'Ping?', embeds: [embed] })
    example
    if (message.content === 'Hello!') message.reply('Hello!')
    

    Parameters

    Returns undefined | Promise<Message>

  • toString(): string
  • Returns the message content

    Returns string

Generated using TypeDoc version 0.22.16, the 9/16/2022 at 1:09:15 AM