Фикс si и ac

This commit is contained in:
JonnyBro 2022-01-12 23:32:03 +05:00
parent c340752c6d
commit 0c56edc62f
2 changed files with 4 additions and 5 deletions

View file

@ -18,10 +18,9 @@ class Achievements extends Command {
} }
async run(message, args, data) { async run(message, args, data) {
const arg = args[0] || message.author let member = message.author;
let member = await this.client.resolveMember(arg, message.guild); if (args[0]) member = await this.client.resolveMember(args[0], message.guild);
if (!member) member = message.member; if (message.guild && member.user.bot) return message.error("economy/profile:BOT_USER");
if (member.user.bot) return message.error("economy/profile:BOT_USER");
const userData = (member.id === message.author.id ? data.userData : await this.client.findOrCreateUser({ const userData = (member.id === message.author.id ? data.userData : await this.client.findOrCreateUser({
id: member.id id: member.id

View file

@ -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"))}` + `${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 "\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.id + message.translate("common:ID"), guild.id, true)
.addField(this.client.customEmojis.crown + message.translate("common:OWNER"), owner.toString(), 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) .addField(this.client.customEmojis.boost + message.translate("general/serverinfo:BOOSTS"), guild.premiumSubscriptionCount || "0", true)