From d0086305e0d9b65a7a677a43b53789b0afec445d Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 13 Apr 2017 16:24:26 +0000 Subject: [PATCH] user.tag and Such --- commands/guildinfo/guildinfo.js | 6 ++---- commands/moderation/ban.js | 4 ++-- commands/moderation/kick.js | 4 ++-- commands/moderation/unban.js | 5 ++--- commands/moderation/warn.js | 5 ++--- commands/userinfo/userinfo.js | 2 +- package.json | 2 +- 7 files changed, 12 insertions(+), 16 deletions(-) diff --git a/commands/guildinfo/guildinfo.js b/commands/guildinfo/guildinfo.js index 6164aedd..4fb534dd 100644 --- a/commands/guildinfo/guildinfo.js +++ b/commands/guildinfo/guildinfo.js @@ -38,12 +38,10 @@ module.exports = class GuildInfoCommand extends Command { message.guild.defaultChannel, true) .addField('**Region:**', message.guild.region, true) - .addField('**XiaoBot Shard:**', - this.client.shard.id, true) .addField('**Owner:**', - `${message.guild.owner.user.username}#${message.guild.owner.user.discriminator}`, true) + message.guild.owner.user.tag, true) .addField('**Users:**', - `${message.guild.memberCount} (With Bots) / ${message.guild.members.filter(member => !member.user.bot).size} (Without Bots)`, true); + message.guild.memberCount, true); return message.embed(embed); } }; diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 34790c7c..339e0099 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -48,10 +48,10 @@ module.exports = class BanCommand extends Command { await member.ban(); await message.say(':ok_hand:'); const embed = new RichEmbed() - .setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL) + .setAuthor(message.author.tag, message.author.avatarURL) .setColor(0xFF0000) .setTimestamp() - .setDescription(`**Member:** ${member.user.username}#${member.user.discriminator} (${member.id})\n**Action:** Ban\n**Reason:** ${reason}`); + .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Ban\n**Reason:** ${reason}`); return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed); } catch (err) { diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index 452f7afc..307bccb4 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -45,10 +45,10 @@ module.exports = class KickCommand extends Command { await member.kick(); await message.say(':ok_hand:'); const embed = new RichEmbed() - .setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL) + .setAuthor(message.author.tag, message.author.avatarURL) .setColor(0xFFA500) .setTimestamp() - .setDescription(`**Member:** ${member.user.username}#${member.user.discriminator} (${member.id})\n**Action:** Kick\n**Reason:** ${reason}`); + .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Kick\n**Reason:** ${reason}`); return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed); } catch (err) { diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index ca9745a0..c5094a68 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -56,11 +56,10 @@ module.exports = class UnbanCommand extends Command { await message.guild.unban(unbanUser); await message.say(':ok_hand:'); const embed = new RichEmbed() - .setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL) + .setAuthor(message.author.tag, message.author.avatarURL) .setColor(0x00AE86) - .setFooter('XiaoBot Moderation', this.client.user.avatarURL) .setTimestamp() - .setDescription(`**Member:** ${unbanUser.username}#${unbanUser.discriminator} (${unbanUser.id})\n**Action:** Unban\n**Reason:** ${reason}`); + .setDescription(`**Member:** ${unbanUser.tag} (${unbanUser.id})\n**Action:** Unban\n**Reason:** ${reason}`); return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed); } catch (err) { diff --git a/commands/moderation/warn.js b/commands/moderation/warn.js index a34d1147..5aaa5950 100644 --- a/commands/moderation/warn.js +++ b/commands/moderation/warn.js @@ -42,11 +42,10 @@ module.exports = class WarnCommand extends Command { try { await message.say(':ok_hand:'); const embed = new RichEmbed() - .setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL) + .setAuthor(message.author.tag, message.author.avatarURL) .setColor(0xFFFF00) - .setFooter('XiaoBot Moderation', this.client.user.avatarURL) .setTimestamp() - .setDescription(`**Member:** ${member.user.username}#${member.user.discriminator} (${member.id})\n**Action:** Warn\n**Reason:** ${reason}`); + .setDescription(`**Member:** ${member.user.tag} (${member.id})\n**Action:** Warn\n**Reason:** ${reason}`); return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed); } catch (err) { diff --git a/commands/userinfo/userinfo.js b/commands/userinfo/userinfo.js index c8fb785e..3b30c4b6 100644 --- a/commands/userinfo/userinfo.js +++ b/commands/userinfo/userinfo.js @@ -56,7 +56,7 @@ module.exports = class UserInfoCommand extends Command { .setColor(color) .setThumbnail(user.displayAvatarURL) .addField('**Name:**', - `${user.username}#${user.discriminator}`, true) + user.tag, true) .addField('**ID:**', user.id, true) .addField('**Joined Discord On:**', diff --git a/package.json b/package.json index 91e9cf44..d763b1d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "24.2.0", + "version": "24.3.0", "description": "A Discord Bot", "main": "shardingmanager.js", "repository": {