From 0c56edc62f89055d2015cc956a6710a1020b7dc4 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Wed, 12 Jan 2022 23:32:03 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20si=20=D0=B8=20ac?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Economy/achievements.js | 7 +++---- commands/General/serverinfo.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/commands/Economy/achievements.js b/commands/Economy/achievements.js index 82115099..d7f90ceb 100644 --- a/commands/Economy/achievements.js +++ b/commands/Economy/achievements.js @@ -18,10 +18,9 @@ class Achievements extends Command { } async run(message, args, data) { - const arg = args[0] || message.author - let member = await this.client.resolveMember(arg, message.guild); - if (!member) member = message.member; - if (member.user.bot) return message.error("economy/profile:BOT_USER"); + let member = message.author; + if (args[0]) member = await this.client.resolveMember(args[0], message.guild); + if (message.guild && member.user.bot) return message.error("economy/profile:BOT_USER"); const userData = (member.id === message.author.id ? data.userData : await this.client.findOrCreateUser({ id: member.id diff --git a/commands/General/serverinfo.js b/commands/General/serverinfo.js index 8b008819..f98d11b6 100644 --- a/commands/General/serverinfo.js +++ b/commands/General/serverinfo.js @@ -47,7 +47,7 @@ class Serverinfo extends Command { `${guild.members.cache.filter(m => !m.user.bot).size} ${message.getNoun(guild.members.cache.filter(m => !m.user.bot).size, message.translate("misc:NOUNS:MEMBERS:1"), message.translate("misc:NOUNS:MEMBERS:2"), message.translate("misc:NOUNS:MEMBERS:5"))}` + "\n" + `${guild.members.cache.filter(m => m.user.bot).size} ${message.getNoun(guild.members.cache.filter(m => m.user.bot).size, message.translate("misc:NOUNS:BOTS:1"), message.translate("misc:NOUNS:BOTS:2"), message.translate("misc:NOUNS:BOTS:5"))}`, true ) - .addField(this.client.customEmojis.afk + message.translate("general/serverinfo:AFK_CHANNEL"), guild.afkChannel || message.translate("general/serverinfo:NO_AFK_CHANNEL"), true) + .addField(this.client.customEmojis.afk + message.translate("general/serverinfo:AFK_CHANNEL"), guild.afkChannel.toString() || message.translate("general/serverinfo:NO_AFK_CHANNEL"), true) .addField(this.client.customEmojis.id + message.translate("common:ID"), guild.id, true) .addField(this.client.customEmojis.crown + message.translate("common:OWNER"), owner.toString(), true) .addField(this.client.customEmojis.boost + message.translate("general/serverinfo:BOOSTS"), guild.premiumSubscriptionCount || "0", true)