JaBa/commands/General/someone.js

37 lines
990 B
JavaScript
Raw Normal View History

2021-12-10 21:39:54 +05:00
const Command = require("../../base/Command.js"),
Discord = require("discord.js");
class Someone extends Command {
2021-12-26 19:29:37 +05:00
constructor(client) {
2021-12-10 21:39:54 +05:00
super(client, {
name: "someone",
dirname: __dirname,
enabled: true,
guildOnly: true,
aliases: ["somebody"],
2021-12-10 21:39:54 +05:00
memberPermissions: [],
2021-12-26 19:29:37 +05:00
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
2021-12-10 21:39:54 +05:00
nsfw: false,
ownerOnly: false,
cooldown: 1000
2021-12-10 21:39:54 +05:00
});
}
2021-12-26 19:29:37 +05:00
async run(message, args, data) {
2021-12-10 21:39:54 +05:00
const member = message.guild.members.cache.random(1)[0];
2021-12-11 01:11:50 +05:00
2021-12-10 21:39:54 +05:00
const embed = new Discord.MessageEmbed()
.addField(message.translate("common:USERNAME"), member.user.username, true)
.addField(message.translate("common:DISCRIMINATOR"), member.user.discriminator, true)
.addField(message.translate("common:ID"), member.user.id, true)
2021-12-26 19:29:37 +05:00
.setThumbnail(member.user.displayAvatarURL({
size: 512,
dynamic: true,
format: "png"
}))
2021-12-10 21:39:54 +05:00
.setColor(data.config.embed.color);
message.channel.send(embed);
}
2021-12-11 01:11:50 +05:00
};
2021-12-10 21:39:54 +05:00
module.exports = Someone;