This repository has been archived on 2024-01-30. You can view files and clone it, but cannot push or open issues or pull requests.
anitrox/commands/userinfo.js

67 lines
1.6 KiB
JavaScript
Raw Normal View History

2021-01-23 01:08:05 -06:00
module.exports = {
name: "userinfo",
description: "Gets info about an user, such as ID, Discord Join date and more.",
execute(client, message, args) {
2021-02-06 12:19:07 -06:00
2021-02-06 11:07:36 -06:00
2021-02-06 12:19:07 -06:00
const user = message.mentions.users.first();
2021-02-06 11:07:36 -06:00
var i=0;i<user.presence.activities.length;i
const activity = user.presence.activities[i];
2021-02-06 12:19:07 -06:00
if(!activity) {
const activity = "This user doesn't have a set status"
// Checks if a user was mentioned. If not, returns error message.
}
2021-02-06 12:19:07 -06:00
2021-01-23 01:08:05 -06:00
const embed = {
2021-02-06 01:42:55 -06:00
"title": "Everything you've ever wanted to know about " + user.username + "!",
2021-02-06 12:19:07 -06:00
"color": 9442302,
2021-01-23 01:08:05 -06:00
"footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
2021-07-21 16:03:29 -05:00
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem644"
2021-01-23 01:08:05 -06:00
},
2021-01-23 01:08:05 -06:00
"thumbnail": {
2021-02-06 01:42:55 -06:00
"url": user.displayAvatarURL()
2021-01-23 01:08:05 -06:00
},
"fields": [
2021-02-06 12:19:07 -06:00
2021-01-23 01:08:05 -06:00
{
"name": "Full Username",
2021-02-06 01:42:55 -06:00
"value": user.tag
},
2021-02-06 12:19:07 -06:00
{
"name": "User Profile Picture",
"value": user.displayAvatarURL()
},
2021-02-06 01:42:55 -06:00
{
"name": "User Presence",
value: user.presence.status
},
{
2021-02-06 12:19:07 -06:00
"name": "Custom Status",
value: activity.state
2021-01-23 01:08:05 -06:00
},
{
"name": "User ID",
2021-02-06 01:42:55 -06:00
"value": "``" + user.id + "``"
2021-01-23 01:08:05 -06:00
},
{
"name": "User Joined Discord",
2021-02-06 01:42:55 -06:00
"value": user.createdAt,
2021-01-23 01:08:05 -06:00
inline: true
},
]
};
message.channel.send({ embed: embed });
}
}