From 19a58a9748109a3e715d7b22897855227138bf74 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Thu, 12 Oct 2023 19:44:26 +0500 Subject: [PATCH] fix error --- helpers/extenders.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/helpers/extenders.js b/helpers/extenders.js index 6639da79..0c90c2b9 100644 --- a/helpers/extenders.js +++ b/helpers/extenders.js @@ -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 } });