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)