From 4f7c207c99bad27d0581c5a6d7cc9dbf1c980043 Mon Sep 17 00:00:00 2001 From: monbrey Date: Wed, 7 Oct 2020 20:58:50 +1100 Subject: [PATCH] feat(Message): inline reply method --- src/structures/Message.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/structures/Message.js b/src/structures/Message.js index 70de928d..2d28d944 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -592,6 +592,23 @@ class Message extends Base { ); } + /** + * Send an inline reply to this message. + * @param {StringResolvable|APIMessage} [content=''] The content for the message + * @param {MessageOptions|MessageAdditions} [options={inlineReplyTo:this}] + * The additional options to provide + * @returns {Promise} + */ + inlineReply(content, options) { + return this.channel.send( + content instanceof APIMessage + ? content + : APIMessage.transformOptions(content, options, { + inlineReplyTo: this, + }), + ); + } + /** * Fetch this message. * @param {boolean} [force=false] Whether to skip the cache check and request the API