aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/Utility/userinfo.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/commands/Utility/userinfo.js b/commands/Utility/userinfo.js
index fb3c996..80bca74 100644
--- a/commands/Utility/userinfo.js
+++ b/commands/Utility/userinfo.js
@@ -1,14 +1,17 @@
exports.run = async (bot, msg) => {
- const user = msg.mentions.members.first();
- const { RichEmbed } = require('discord.js');
- msg.channel.send(
- new RichEmbed()
- .setColor(0x00ae86)
- .setTitle(`User Information`)
- .addField('User ID', user.id)
- .addField('Account Creation Date', user.user.createdAt)
- .addField('Join Guild Date', user.joinedAt)
- .addField('Names', 'Display Name: ' + user.displayName + `\nUsername: ${user.user.tag}`)
+ const user = msg.mentions.members.first();
+ if (!user) {
+ user = msg.author;
+ };
+ const { RichEmbed } = require('discord.js');
+ msg.channel.send(
+ new RichEmbed()
+ .setColor(0x00ae86)
+ .setTitle(`User Information`)
+ .addField('User ID', user.id)
+ .addField('Account Creation Date', user.user.createdAt)
+ .addField('Join Guild Date', user.joinedAt)
+ .addField('Names', 'Display Name: ' + user.displayName + `\nUsername: ${user.user.tag}`)
);
};