Update APIMessage.js

This commit is contained in:
Crawl 2020-03-18 05:12:03 +01:00 committed by GitHub
parent 1a699f2718
commit 6c45f118d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,9 +111,11 @@ class APIMessage {
let replyPrefix = '';
if (this.options.reply && !this.isUser && this.target.type !== 'dm') {
const id = this.target.client.users.resolveID(this.options.reply);
replyPrefix = this.options.replyPrefixer ? this.options.replyPrefixer(this.options.reply) :
this.target.client.options.replyPrefixer ? this.target.client.options.replyPrefixer(this.options.reply) :
`<@${this.options.reply instanceof GuildMember && this.options.reply.nickname ? '!' : ''}${id}>, `;
replyPrefix = this.options.replyPrefixer
? this.options.replyPrefixer(this.options.reply)
: this.target.client.options.replyPrefixer
? this.target.client.options.replyPrefixer(this.options.reply)
: `<@${this.options.reply instanceof GuildMember && this.options.reply.nickname ? '!' : ''}${id}>, `;
if (isSplit) splitOptions.prepend = `${replyPrefix}${splitOptions.prepend || ''}`;
}