This commit is contained in:
Neko Life 2021-06-30 13:43:23 +09:00
parent 44e099f530
commit cd3985547c
3 changed files with 9 additions and 8 deletions

View file

@ -26,19 +26,19 @@ module.exports = class profile extends commando.Command {
if (!arg) TM = msg.author; else TM = getUser(msg, arg);
if (!TM) return trySend(msg.client, msg, "Bro stop lookin for yo imaginary gf");
const MEM = msg.guild.member(TM),
emb = defaultImageEmbed(msg, null, `\`${TM.tag}\`'s Profile`);
emb = defaultImageEmbed(msg, null, `\`${TM.tag}\`'s Profile`);
emb
.setThumbnail(TM.displayAvatarURL({format: "png", size: 4096, dynamic: true}))
.addField("Registered", TM.createdAt.toUTCString().slice(0, -4), true)
.addField("ID", TM.id, true);
if (msg.author.description) {
.setThumbnail(TM.displayAvatarURL({ format: "png", size: 4096, dynamic: true }))
.addField("Registered", TM.createdAt.toUTCString().slice(0, -4), true)
.addField("ID", TM.id, true);
if (TM.description) {
emb.setDescription(TM.description);
}
if (MEM) {
const RI = MEM.roles.cache.sort((a, b) => b.position - a.position).map(r => r.id).slice(0, -1),
RFS = splitOnLength(RI, 1010, ">, <@&");
RFS = splitOnLength(RI, 1010, ">, <@&");
emb.addField("Joined", MEM.joinedAt.toUTCString().slice(0, -4))
.addField("Nick", `\`${MEM.displayName}\``);
.addField("Nick", `\`${MEM.displayName}\``);
if (RFS[0]?.length > 0) {
for (const p of RFS) {
emb.addField(emb.fields.length === 4 ? "Roles" : "", "<@&" + p.join(">, <@&") + ">");

View file

@ -15,7 +15,7 @@ module.exports = async (msg) => {
let check = false;
if (msg.channel.id === msg.guild.eventChannels?.mesDel?.channel && msg.author ? msg.author !== msg.client.user : false && ignored === false) check = true;
if (msg.guild.eventChannels?.mesDel?.channel !== msg.channel.id && ignored === false || check) {
const log = getChannel(msg, msg.guild.eventChannels.mesDel.channel);
const log = getChannel(msg, msg.guild.eventChannels.mesDel?.channel);
if (!log || !msg.author) return;
const emb = defaultEventLogEmbed(msg.guild);
emb.setColor(getColor("yellow"))

View file

@ -478,6 +478,7 @@ function getUser(msg, key) {
const use = cleanMentionID(key);
let u;
if (/^\d{17,19}$/.test(use)) u = msg.client.users.cache.get(use);
console.log(u);
if (!u) u = getMember(msg.guild, use)?.[0].user;
return u;
}