mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
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:
@@ -610,7 +610,7 @@ class Message extends Base {
|
||||
* Send an inline reply to this message.
|
||||
* @param {StringResolvable|APIMessage} [content=''] The content for the message
|
||||
* @param {MessageOptions|MessageAdditions} [options] The additional options to provide
|
||||
* @param {MessageResolvable} [options.replyTo=this] The message to reply to
|
||||
* @param {MessageResolvable} [options.reply.messageReference=this] The message to reply to
|
||||
* @returns {Promise<Message|Message[]>}
|
||||
*/
|
||||
reply(content, options) {
|
||||
@@ -618,7 +618,10 @@ class Message extends Base {
|
||||
content instanceof APIMessage
|
||||
? content
|
||||
: APIMessage.transformOptions(content, options, {
|
||||
replyTo: this,
|
||||
reply: {
|
||||
messageReference: this,
|
||||
failIfNotExists: options?.reply?.failIfNotExists ?? content?.reply?.failIfNotExists ?? true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user