feat(Message): inline reply method

This commit is contained in:
monbrey 2020-10-07 20:58:50 +11:00
parent 975b6cbd94
commit 4f7c207c99

View file

@ -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<Message|Message[]>}
*/
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