Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Message<T>

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Optional activity

activity: undefined | MessageActivity

Optional application

application: undefined | MessageApplication

attachments

attachments: Attachment[]

author

author: User

channel

channel: T

channelMentions

channelMentions: string[]

cleanContent

cleanContent: string
deprecated

Optional command

command: undefined | Command

content

content: string

createdAt

createdAt: number

Optional editedTimestamp

editedTimestamp: undefined | number

embeds

embeds: Embed[]

flags

flags: number

guildID

guildID: T extends GuildTextable ? string : undefined

id

id: string

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: undefined | string

reactions

reactions: {}

Type declaration

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

Optional referencedMessage

referencedMessage: undefined | null | Message<TextableChannel>

roleMentions

roleMentions: string[]

Optional stickers

stickers: undefined | 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

  • editWebhook(token: string, options: Pick<WebhookPayload, "content" | "embeds" | "file" | "allowedMentions">): Promise<Message<T>>
  • Parameters

    • token: string
    • options: Pick<WebhookPayload, "content" | "embeds" | "file" | "allowedMentions">

    Returns Promise<Message<T>>

getReaction

  • getReaction(reaction: string, limit?: number, before?: string, after?: string): Promise<User[]>
  • 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>

Generated using TypeDoc