mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 01:04:16 +02:00
The Power of const
This commit is contained in:
@@ -30,7 +30,7 @@ module.exports = class UserInfoCommand extends commando.Command {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let user = args.user;
|
||||
const user = args.user;
|
||||
let stat;
|
||||
let color;
|
||||
switch (user.presence.status) {
|
||||
@@ -51,13 +51,7 @@ module.exports = class UserInfoCommand extends commando.Command {
|
||||
color = 0x808080;
|
||||
break;
|
||||
}
|
||||
let userGame;
|
||||
if (!user.presence.game) {
|
||||
userGame = "None";
|
||||
}
|
||||
else {
|
||||
userGame = user.presence.game.name;
|
||||
}
|
||||
const userGame = user.presence.game;
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setColor(color)
|
||||
.setThumbnail(user.displayAvatarURL)
|
||||
@@ -72,7 +66,7 @@ module.exports = class UserInfoCommand extends commando.Command {
|
||||
.addField('**Status:**',
|
||||
stat, true)
|
||||
.addField('**Playing:**',
|
||||
userGame, true);
|
||||
userGame.name || 'None', true);
|
||||
return message.embed(embed);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user