Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Message<T>

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Optional activity

activity: MessageActivity

Optional application

application: MessageApplication

attachments

attachments: Attachment[]

author

author: User

channel

channel: T

channelMentions

channelMentions: string[]

cleanContent

cleanContent: string
deprecated

Optional command

command: Command

content

content: string

createdAt

createdAt: number

Optional editedTimestamp

editedTimestamp: number

embeds

embeds: Embed[]

flags

flags: number

guildID

guildID: T extends GuildTextable ? string : undefined

id

id: string

interaction

interaction: null | MessageInteraction

jumpLink

jumpLink: string

member

member: T extends GuildTextable ? Member : null

mentionEveryone

mentionEveryone: boolean

mentions

mentions: User[]

messageReference

messageReference: null | MessageReference

pinned

pinned: boolean

Optional prefix

prefix: string

reactions

reactions: {}

Type declaration

  • [s: string]: { count: number; me: boolean }
    • count: number
    • me: boolean

Optional referencedMessage

referencedMessage: null | Message<TextableChannel>

roleMentions

roleMentions: string[]

Optional stickers

stickers: Sticker[]

timestamp

timestamp: number

tts

tts: boolean

type

type: number

webhookID

webhookID: T extends GuildTextable ? undefined | string : undefined

Methods

addReaction

  • addReaction(reaction: string): Promise<void>
  • addReaction(reaction: string, userID: string): Promise<void>
  • Parameters

    • reaction: string

    Returns Promise<void>

  • deprecated

    Parameters

    • reaction: string
    • userID: string

    Returns Promise<void>

crosspost

delete

  • delete(reason?: string): Promise<void>
  • Parameters

    • Optional reason: string

    Returns Promise<void>

deleteWebhook

  • deleteWebhook(token: string): Promise<void>
  • Parameters

    • token: string

    Returns Promise<void>

edit

  • Parameters

    Returns Promise<Message<T>>

editWebhook

getReaction

  • getReaction(reaction: string, options?: GetMessageReactionOptions): Promise<User[]>
  • getReaction(reaction: string, limit?: number, before?: string, after?: string): Promise<User[]>
  • Parameters

    Returns Promise<User[]>

  • deprecated

    Parameters

    • reaction: string
    • Optional limit: number
    • Optional before: string
    • Optional after: string

    Returns Promise<User[]>

inspect

  • Returns Message<T>

pin

  • pin(): Promise<void>
  • Returns Promise<void>

removeReaction

  • removeReaction(reaction: string, userID?: string): Promise<void>
  • Parameters

    • reaction: string
    • Optional userID: string

    Returns Promise<void>

removeReactionEmoji

  • removeReactionEmoji(reaction: string): Promise<void>
  • Parameters

    • reaction: string

    Returns Promise<void>

removeReactions

  • removeReactions(): Promise<void>
  • Returns Promise<void>

toJSON

  • Parameters

    • Optional props: string[]

    Returns JSONCache

toString

  • toString(): string
  • Returns string

unpin

  • unpin(): Promise<void>
  • Returns Promise<void>

Static getCreatedAt

  • getCreatedAt(id: string): number
  • Parameters

    • id: string

    Returns number

Generated using TypeDoc