Merge branch 'master' of https://gitlab.com/loicbersier/discordbot
This commit is contained in:
commit
751c2ea6a3
2 changed files with 8 additions and 6 deletions
|
@ -16,7 +16,7 @@ class ServerCommand extends Command {
|
|||
}
|
||||
|
||||
async exec(message) {
|
||||
let botCount = message.guild.members.filter(member => member.user.bot).size;
|
||||
let botCount = message.guild.members.cache.filter(member => member.user.bot).size;
|
||||
const addEmbed = this.client.util.embed()
|
||||
.setColor(message.member.displayHexColor)
|
||||
.setTitle(message.guild.name)
|
||||
|
@ -24,8 +24,8 @@ class ServerCommand extends Command {
|
|||
.addField('Number of users', message.guild.memberCount - botCount, true)
|
||||
.addField('Number of bots', botCount, true)
|
||||
.addField('Total number of members', message.guild.memberCount, true)
|
||||
.addField('Number of channels', message.guild.channels.size, true)
|
||||
.addBlankField()
|
||||
.addField('Number of channels', message.guild.channels.cache.size, true)
|
||||
.addField('', '')
|
||||
.addField('Date when guild created', message.guild.createdAt, true)
|
||||
.addField('Owner', message.guild.owner, true)
|
||||
.setTimestamp();
|
||||
|
|
|
@ -30,6 +30,8 @@ class userInfoCommand extends Command {
|
|||
|
||||
let member = message.guild.member(user);
|
||||
|
||||
console.log(member);
|
||||
|
||||
const Embed = this.client.util.embed()
|
||||
.setColor(member.displayHexColor)
|
||||
.setAuthor(`${user.tag} (${user.id})`, user.displayAvatarURL())
|
||||
|
@ -42,10 +44,10 @@ class userInfoCommand extends Command {
|
|||
// Show since when this user have been boosting the current guild
|
||||
if (member.premiumSince) Embed.addField('Boosting this guild since', member.premiumSince, true);
|
||||
|
||||
Embed.addBlankField();
|
||||
Embed.addField('', '');
|
||||
|
||||
// Show user status
|
||||
if (user.presence.activity) Embed.addField('Presence', user.presence.activity, true);
|
||||
if (user.presence.activity) Embed.addField('Presence', user.presence.activities[0], true);
|
||||
|
||||
// Is the user a bot?
|
||||
if (user.bot) Embed.addField('Is a bot?', '✅', true);
|
||||
|
@ -57,7 +59,7 @@ class userInfoCommand extends Command {
|
|||
|
||||
// Show on which platform they are using discord from if its not a bot
|
||||
if (user.presence.clientStatus && !user.bot) {
|
||||
Embed.addBlankField();
|
||||
Embed.addField('', '');
|
||||
if (user.presence.clientStatus.mobile) Embed.addField('Using discord on', '📱 ' + user.presence.clientStatus.mobile, true);
|
||||
if (user.presence.clientStatus.desktop) Embed.addField('Using discord on', '💻 ' + user.presence.clientStatus.desktop, true);
|
||||
if (user.presence.clientStatus.web) Embed.addField('Using discord on', '☁️ ' + user.presence.clientStatus.web, true);
|
||||
|
|
Loading…
Reference in a new issue