MessageHandle
Defined in: packages/core/src/handles.ts:345
A message, by channel id and message id. Made by bot.message(channelId, messageId).
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MessageHandle(
bot,channelId,messageId):MessageHandle
Defined in: packages/core/src/handles.ts:346
Parameters
Section titled “Parameters”channelId
Section titled “channelId”string
messageId
Section titled “messageId”string
Returns
Section titled “Returns”MessageHandle
Properties
Section titled “Properties”channelId
Section titled “channelId”
readonlychannelId:string
Defined in: packages/core/src/handles.ts:348
messageId
Section titled “messageId”
readonlymessageId:string
Defined in: packages/core/src/handles.ts:349
Methods
Section titled “Methods”channel()
Section titled “channel()”channel():
ChannelHandle
Defined in: packages/core/src/handles.ts:364
Returns
Section titled “Returns”crosspost()
Section titled “crosspost()”crosspost():
Promise<Message>
Defined in: packages/core/src/handles.ts:415
Publishes the message from an announcement channel.
Returns
Section titled “Returns”Promise<Message>
delete()
Section titled “delete()”delete(
reason?):Promise<void>
Defined in: packages/core/src/handles.ts:375
Parameters
Section titled “Parameters”reason?
Section titled “reason?”string
Returns
Section titled “Returns”Promise<void>
edit()
Section titled “edit()”edit(
message):Promise<Message>
Defined in: packages/core/src/handles.ts:368
Parameters
Section titled “Parameters”message
Section titled “message”string | MessageEditOptions
Returns
Section titled “Returns”Promise<Message>
fetch()
Section titled “fetch()”fetch():
Promise<Message>
Defined in: packages/core/src/handles.ts:360
Returns
Section titled “Returns”Promise<Message>
Implementation of
Section titled “Implementation of”get():
Promise<Message>
Defined in: packages/core/src/handles.ts:357
Returns
Section titled “Returns”Promise<Message>
Implementation of
Section titled “Implementation of”peek()
Section titled “peek()”peek():
Message|undefined
Defined in: packages/core/src/handles.ts:352
Returns
Section titled “Returns”Message | undefined
Implementation of
Section titled “Implementation of”pin(
reason?):Promise<void>
Defined in: packages/core/src/handles.ts:400
Parameters
Section titled “Parameters”reason?
Section titled “reason?”string
Returns
Section titled “Returns”Promise<void>
react()
Section titled “react()”react(
emoji):Promise<void>
Defined in: packages/core/src/handles.ts:393
Adds the bot’s reaction ("👍", or "name:id" for a custom emoji).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
reply()
Section titled “reply()”reply(
message):Promise<Message>
Defined in: packages/core/src/handles.ts:383
Sends a message that replies to this one.
Parameters
Section titled “Parameters”message
Section titled “message”Returns
Section titled “Returns”Promise<Message>
unpin()
Section titled “unpin()”unpin(
reason?):Promise<void>
Defined in: packages/core/src/handles.ts:407
Parameters
Section titled “Parameters”reason?
Section titled “reason?”string
Returns
Section titled “Returns”Promise<void>