mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-21 20:54:58 +05:00
fix error
This commit is contained in:
parent
c620e492c9
commit
19a58a9748
1 changed files with 4 additions and 2 deletions
|
@ -12,7 +12,8 @@ BaseInteraction.prototype.translate = function (key, args) {
|
|||
};
|
||||
|
||||
BaseInteraction.prototype.replyT = function (key, args, options = {}) {
|
||||
const string = options.prefixEmoji ? `${this.client.customEmojis[options.prefixEmoji]} | ${string}` : this.translate(key, args, this.guild ? this.guild.data.language : "en-US");
|
||||
const translated = this.translate(key, args, this.guild ? this.guild.data.language : "en-US");
|
||||
const string = options.prefixEmoji ? `${this.client.customEmojis[options.prefixEmoji]} | ${translated}` : translated;
|
||||
|
||||
if (options.edit) return this.editReply({ content: string, ephemeral: options.ephemeral || false });
|
||||
else return this.reply({ content: string, ephemeral: options.ephemeral || false });
|
||||
|
@ -38,7 +39,8 @@ Message.prototype.translate = function (key, args) {
|
|||
};
|
||||
|
||||
Message.prototype.replyT = function (key, args, options = {}) {
|
||||
const string = options.prefixEmoji ? `${this.client.customEmojis[options.prefixEmoji]} | ${string}` : this.translate(key, args, this.guild ? this.guild.data.language : "en-US");
|
||||
const translated = this.translate(key, args, this.guild ? this.guild.data.language : "en-US");
|
||||
const string = options.prefixEmoji ? `${this.client.customEmojis[options.prefixEmoji]} | ${translated}` : translated;
|
||||
|
||||
if (options.edit) return this.edit({ content: string, allowedMentions: { repliedUser: options.mention ? true : false } });
|
||||
else return this.reply({ content: string, allowedMentions: { repliedUser: options.mention ? true : false } });
|
||||
|
|
Loading…
Reference in a new issue