Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Message

Channel Message Structure

Hierarchy

Index

Constructors

constructor

Properties

Optional _attachments

_attachments: BaseCollection<string, Attachment>

_content

_content: string = ""

Optional _embeds

_embeds: BaseCollection<number, MessageEmbed>

_keys

_keys: BaseSet<string> = keysMessage

_keysMerge

_keysMerge: BaseSet<string> = keysMergeMessage

_keysSkipDifference

_keysSkipDifference: BaseSet<string> = keysSkipDifferenceMessage

Optional _mentionChannels

_mentionChannels: BaseCollection<string, Channel>

Optional _mentionRoles

_mentionRoles: BaseCollection<string, null | Role>

Optional _mentions

_mentions: BaseCollection<string, Member | User>

Optional _reactions

_reactions: BaseCollection<string, Reaction>

Optional activity

activity: MessageActivity

Optional application

application: Application

author

author: User

Optional call

channelId

channelId: string = ""

client

client: ShardClient

content

content: string = ""

deleted

deleted: boolean = false

editedTimestampUnix

editedTimestampUnix: number = 0

flags

flags: number = 0

Optional guildId

guildId: undefined | string

id

id: string = ""

Optional member

member: Member

mentionEveryone

mentionEveryone: boolean = false

Optional messageReference

messageReference: MessageReference

Optional nonce

nonce: undefined | string

pinned

pinned: boolean = false

timestampUnix

timestampUnix: number = 0

tts

tts: boolean = false

type

type: MessageTypes = MessageTypes.BASE

Optional webhookId

webhookId: undefined | string

Accessors

attachments

  • get attachments(): BaseCollection<string, Attachment>
  • Returns BaseCollection<string, Attachment>

canDelete

  • get canDelete(): boolean
  • Returns boolean

canManage

  • get canManage(): boolean
  • Returns boolean

canReact

  • get canReact(): boolean
  • Returns boolean

canReply

  • get canReply(): boolean
  • Returns boolean

channel

  • Returns Channel | null

createdAt

  • get createdAt(): Date
  • Returns Date

createdAtUnix

  • get createdAtUnix(): number
  • Returns number

editedAt

  • get editedAt(): Date | null
  • Returns Date | null

editedAtUnix

  • get editedAtUnix(): number
  • Returns number

editedTimestamp

  • get editedTimestamp(): Date | null
  • Returns Date | null

embeds

  • Returns BaseCollection<number, MessageEmbed>

fromBot

  • get fromBot(): boolean
  • Returns boolean

fromMe

  • get fromMe(): boolean
  • Returns boolean

fromSystem

  • get fromSystem(): boolean
  • Returns boolean

fromUser

  • get fromUser(): boolean
  • Returns boolean

fromWebhook

  • get fromWebhook(): boolean
  • Returns boolean

guild

  • get guild(): Guild | null
  • Returns Guild | null

hasAttachment

  • get hasAttachment(): boolean
  • Returns boolean

hasFlagCrossposted

  • get hasFlagCrossposted(): boolean
  • Returns boolean

hasFlagIsCrossposted

  • get hasFlagIsCrossposted(): boolean
  • Returns boolean

hasFlagSuppressEmbeds

  • get hasFlagSuppressEmbeds(): boolean
  • Returns boolean

inDm

  • get inDm(): boolean
  • Returns boolean

isEdited

  • get isEdited(): boolean
  • Returns boolean

jumpLink

  • get jumpLink(): string
  • Returns string

mentionChannels

  • get mentionChannels(): BaseCollection<string, Channel>
  • Returns BaseCollection<string, Channel>

mentionRoles

  • get mentionRoles(): BaseCollection<string, null | Role>
  • Returns BaseCollection<string, null | Role>

mentions

  • get mentions(): BaseCollection<string, Member | User>
  • Returns BaseCollection<string, Member | User>

reactions

  • get reactions(): BaseCollection<string, Reaction>
  • Returns BaseCollection<string, Reaction>

shardId

  • get shardId(): number
  • Returns number

systemContent

  • get systemContent(): string
  • Returns string

timestamp

  • get timestamp(): Date
  • Returns Date

Methods

[inspect.custom]

  • [inspect.custom](): object

_getFromSnake

  • _getFromSnake(key: string): any
  • Parameters

    • key: string

    Returns any

_setFromSnake

  • _setFromSnake(key: string, value: any): any
  • Parameters

    • key: string
    • value: any

    Returns any

ack

  • ack(token: string): Promise<any>
  • Parameters

    • token: string

    Returns Promise<any>

convertContent

  • convertContent(options?: object): string
  • Parameters

    • Default value options: object = {}
      • Optional escapeMentions?: undefined | false | true
      • Optional guildSpecific?: undefined | false | true
      • Optional nick?: undefined | false | true
      • Optional text?: undefined | string

    Returns string

delete

  • delete(options?: DeleteMessage): Promise<any>
  • Parameters

    • Default value options: DeleteMessage = {}

    Returns Promise<any>

deleteReaction

  • deleteReaction(emoji: string, userId?: string): Promise<any>
  • Parameters

    • emoji: string
    • Default value userId: string = "@me"

    Returns Promise<any>

deleteReactions

  • deleteReactions(): Promise<any>
  • Returns Promise<any>

difference

  • difference(key: string, value: any): [boolean, any]
  • Parameters

    • key: string
    • value: any

    Returns [boolean, any]

differences

edit

  • edit(options?: EditMessage | string): Promise<Message>
  • Parameters

    • Default value options: EditMessage | string = {}

    Returns Promise<Message>

fetchReactions

  • fetchReactions(emoji: string, options?: FetchReactions): Promise<BaseCollection<string, User>>
  • Parameters

    • emoji: string
    • Default value options: FetchReactions = {}

    Returns Promise<BaseCollection<string, User>>

hasFlag

  • hasFlag(flag: number): boolean
  • Parameters

    • flag: number

    Returns boolean

merge

mergeValue

  • mergeValue(key: string, value: any): void
  • Parameters

    • key: string
    • value: any

    Returns void

pin

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

publish

  • Parameters

    • options: CreateApplicationNews

    Returns Promise<ApplicationNews>

react

  • react(emoji: string): Promise<any>
  • Parameters

    • emoji: string

    Returns Promise<any>

removeMention

  • removeMention(): Promise<any>
  • Returns Promise<any>

reply

  • reply(options?: CreateMessage | string): Promise<Message>
  • Parameters

    • Default value options: CreateMessage | string = {}

    Returns Promise<Message>

suppressEmbeds

  • suppressEmbeds(suppress?: boolean): Promise<any>
  • Parameters

    • Default value suppress: boolean = true

    Returns Promise<any>

toJSON

  • toJSON(): object
  • Returns object

toString

  • toString(): string
  • Returns string

triggerTyping

  • triggerTyping(): Promise<any>
  • Returns Promise<any>

unpin

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

Generated using TypeDoc