Skip to content

Message

Constructors

new Message()

new Message(client, message): Message

Parameters

ParameterType
clientClient<Transformers, CacheManagerStructure>
messageGuildStructure | Structure

Returns

Message

Defined in

transformers/src/factories/message.ts:76

Properties

id

readonly id: string

Defined in

transformers/src/factories/message.ts:36


author

readonly author: User

Defined in

transformers/src/factories/message.ts:37


channelId

readonly channelId: string

Defined in

transformers/src/factories/message.ts:38


content

readonly content: undefined | string

Defined in

transformers/src/factories/message.ts:39


timestamp

readonly timestamp: Date

Defined in

transformers/src/factories/message.ts:40


editedTimestamp

readonly editedTimestamp: undefined | Date = undefined

Defined in

transformers/src/factories/message.ts:41


tts

readonly tts: boolean

Defined in

transformers/src/factories/message.ts:42


mentionsEveryone

readonly mentionsEveryone: boolean

Defined in

transformers/src/factories/message.ts:43


mentions

readonly mentions: User[]

Defined in

transformers/src/factories/message.ts:44


mentionedRoles

readonly mentionedRoles: Structure[]

Defined in

transformers/src/factories/message.ts:45


mentionedChannels

readonly mentionedChannels: MentionChannel[]

Defined in

transformers/src/factories/message.ts:46


attachments

readonly attachments: undefined | AttachmentStructure[]

Defined in

transformers/src/factories/message.ts:47


embeds

readonly embeds: undefined | Structure[]

Defined in

transformers/src/factories/message.ts:48


reactions

readonly reactions: ReactionStructure[]

Defined in

transformers/src/factories/message.ts:49


nonce

readonly nonce: undefined | string | number

Defined in

transformers/src/factories/message.ts:50


pinned

readonly pinned: boolean

Defined in

transformers/src/factories/message.ts:51


webhookId

readonly webhookId: undefined | string

Defined in

transformers/src/factories/message.ts:52


type

readonly type: MessageType

Defined in

transformers/src/factories/message.ts:53


activity

readonly activity: undefined | ActivityStructure

Defined in

transformers/src/factories/message.ts:54


application

readonly application: undefined | Partial<Structure>

Defined in

transformers/src/factories/message.ts:55


applicationId

readonly applicationId: undefined | string

Defined in

transformers/src/factories/message.ts:56


messageReference

readonly messageReference: undefined | ReferenceStructure

Defined in

transformers/src/factories/message.ts:57


flags

readonly flags: number

Defined in

transformers/src/factories/message.ts:58


referencedMessage

readonly referencedMessage: undefined | Message

Defined in

transformers/src/factories/message.ts:59


interactionMetadata

readonly interactionMetadata: undefined | InteractionMetadataStructure

Defined in

transformers/src/factories/message.ts:60


interaction

readonly interaction: undefined | InteractionStructure

Defined in

transformers/src/factories/message.ts:61


thread

readonly thread: undefined | Channel

Defined in

transformers/src/factories/message.ts:62


components

readonly components: undefined | Structure[]

Defined in

transformers/src/factories/message.ts:63


stickerItems

readonly stickerItems: undefined | ItemStructure[]

Defined in

transformers/src/factories/message.ts:64


stickers

readonly stickers: undefined | Structure[]

Defined in

transformers/src/factories/message.ts:65


position

readonly position: undefined | number

Defined in

transformers/src/factories/message.ts:66


roleSubscriptionData

readonly roleSubscriptionData: undefined | SubscriptionDataStructure

Defined in

transformers/src/factories/message.ts:67


resolved

readonly resolved: undefined | ResolvedDataStructure

Defined in

transformers/src/factories/message.ts:68


poll

readonly poll: undefined | Poll

Defined in

transformers/src/factories/message.ts:69


guildId

readonly guildId: undefined | string

Defined in

transformers/src/factories/message.ts:70


member

readonly member: undefined | GuildMember

Defined in

transformers/src/factories/message.ts:71


client

readonly client: Client<Transformers, CacheManagerStructure>

Defined in

transformers/src/factories/message.ts:73

Methods

reply()

reply(content, options)

reply(content, options?): Promise<Message>

Parameters
ParameterType
contentstring
options?MessageReplyOptions
Returns

Promise<Message>

Defined in

transformers/src/factories/message.ts:121

reply(options)

reply(options): Promise<Message>

Parameters
ParameterType
optionsMessageReplyOptions
Returns

Promise<Message>

Defined in

transformers/src/factories/message.ts:122


sendInChannel()

sendInChannel(content, options)

sendInChannel(content, options?): Promise<Message>

Parameters
ParameterType
contentstring
options?MessageReplyOptions
Returns

Promise<Message>

Defined in

transformers/src/factories/message.ts:165

sendInChannel(options)

sendInChannel(options): Promise<Message>

Parameters
ParameterType
optionsMessageReplyOptions
Returns

Promise<Message>

Defined in

transformers/src/factories/message.ts:166


forwardTo()

forwardTo(channelId, options): Promise<Message>

Parameters

ParameterType
channelIdstring
optionsMessageReplyOptions

Returns

Promise<Message>

Defined in

transformers/src/factories/message.ts:206


edit()

edit(content, options)

edit(content, options?): Promise<Message>

Parameters
ParameterType
contentstring
options?MessageEditOptions
Returns

Promise<Message>

Defined in

transformers/src/factories/message.ts:250

edit(options)

edit(options): Promise<Message>

Parameters
ParameterType
optionsMessageEditOptions
Returns

Promise<Message>

Defined in

transformers/src/factories/message.ts:251


react()

react(emoji, isCustomEmoji): Promise<void>

Parameters

ParameterTypeDefault value
emojistringundefined
isCustomEmojibooleanfalse

Returns

Promise<void>

Defined in

transformers/src/factories/message.ts:288


delete()

delete(reason?): Promise<void>

Parameters

ParameterType
reason?string

Returns

Promise<void>

Defined in

transformers/src/factories/message.ts:292


crosspost()

crosspost(): Promise<void>

Returns

Promise<void>

Defined in

transformers/src/factories/message.ts:296


pin()

pin(): Promise<void>

Returns

Promise<void>

Defined in

transformers/src/factories/message.ts:300


unpin()

unpin(): Promise<void>

Returns

Promise<void>

Defined in

transformers/src/factories/message.ts:304


startThread()

startThread(name): Promise<Channel>

Parameters

ParameterType
namestring

Returns

Promise<Channel>

Defined in

transformers/src/factories/message.ts:308


fetchChannel()

fetchChannel(force): Promise<Channel>

Parameters

ParameterTypeDefault value
forcebooleanfalse

Returns

Promise<Channel>

Defined in

transformers/src/factories/message.ts:314


hasContent()

hasContent(): this is Message & Object

Returns

this is Message & Object

Defined in

transformers/src/factories/message.ts:329


hasAttachments()

hasAttachments(): this is Message & Object

Returns

this is Message & Object

Defined in

transformers/src/factories/message.ts:333


hasEmbeds()

hasEmbeds(): this is Message & Object

Returns

this is Message & Object

Defined in

transformers/src/factories/message.ts:337


hasComponents()

hasComponents(): this is Message & Object

Returns

this is Message & Object

Defined in

transformers/src/factories/message.ts:341


hasStickers()

hasStickers(): this is Message & Object

Returns

this is Message & Object

Defined in

transformers/src/factories/message.ts:345