Skip to main content

Module messages

Module messages 

Source
Expand description

Messages and reactions. Every call is an ordinary command on the bot’s member, checked by the host’s permission engine exactly as for any member.

Functions§

delete
message.delete.
dm
A direct message to member member-id (capability dms): opens the DM when needed, then sends. Returns the DM’s channel id and the message id.
edit
message.edit of one of the bot’s messages.
history
message.history: up to limit (1-100) messages before before.
react
reaction.add.
send
message.send. Returns the new message id.
unreact
reaction.remove of the bot’s own reaction.
upload
Uploads a file for the bot’s next message (capability attachments). Returns the attachment id to put in message-body.attachments.

Type Aliases§

HostError
Id
Message
MessageBody