diff options
| author | pokesudenk <thisis@notarealema.il> | 2018-02-24 20:20:09 -0500 |
|---|---|---|
| committer | pokesudenk <thisis@notarealema.il> | 2018-02-24 20:20:09 -0500 |
| commit | 9b6936e94492b0f344200122e9fd7495c307fde4 (patch) | |
| tree | 83d520300c81baeb58aff7d9d65b0063e1baa801 /commands/Utility | |
| parent | 60f687c8823ff6179e13b66b6a0f910f1c59cae9 (diff) | |
| download | PokeBot-9b6936e94492b0f344200122e9fd7495c307fde4.tar.gz PokeBot-9b6936e94492b0f344200122e9fd7495c307fde4.tar.bz2 PokeBot-9b6936e94492b0f344200122e9fd7495c307fde4.zip | |
trying this
Diffstat (limited to 'commands/Utility')
| -rw-r--r-- | commands/Utility/userinfo.js | 23 |
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}`) ); }; |
