refactor(MessageOptions): move replyTo to reply#messageReference and add failIfNotExists (#5298)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Shubham Parihar <shubhamparihar391@gmail.com>
This commit is contained in:
ckohen
2021-05-10 03:27:36 -07:00
committed by GitHub
parent 533c2471c2
commit 1ecda83da7
4 changed files with 27 additions and 8 deletions

View File

@@ -63,7 +63,7 @@ class TextBasedChannel {
* @property {string|boolean} [code] Language for optional codeblock formatting to apply
* @property {boolean|SplitOptions} [split=false] Whether or not the message should be split into multiple messages if
* it exceeds the character limit. If an object is provided, these are the options for splitting the message
* @property {MessageResolvable} [replyTo] The message to reply to (must be in the same channel and not system)
* @property {ReplyOptions} [reply] The options for replying to a message
*/
/**
@@ -98,6 +98,14 @@ class TextBasedChannel {
* @property {string} [append=''] Text to append to every piece except the last
*/
/**
* Options for sending a message with a reply.
* @typedef {Object} ReplyOptions
* @param {MessageResolvable} messageReference The message to reply to (must be in the same channel and not system)
* @param {boolean} [failIfNotExists=true] Whether to error if the referenced message
* does not exist (creates a standard message in this case when false)
*/
/**
* Sends a message to this channel.
* @param {StringResolvable|APIMessage} [content=''] The content to send