cleanup and option to send reply in dm

This commit is contained in:
Erik 2022-04-29 20:08:07 +03:00
parent db69ac885d
commit 3a3022abae
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -130,7 +130,16 @@ class InvokerWrapper {
if (!embed.color) embed.color = 619452;
});
if (options._edit) this._pending = await this._editReply(options);
if (options.dm) {
this._pending = await this.author.send(options);
await this.target.reply({
content: ':thumbsup:',
ephemeral: true
});
return this._pending;
}
if (options._edit) this._pending = await this.target.editReply(options);
else this._pending = await this.target.reply(options);
return this._pending;
@ -143,13 +152,6 @@ class InvokerWrapper {
return this.reply(options);
}
/**
* @private
*/
async _editReply(options) {
return this.target.editReply(options);
}
emojify(options = {}) {
if (!Emojis[options.emoji])
this.client.logger.warn(`Invalid emoji provided to command ${this.command.resolveable}: "${options.emoji}"`);