mirror of
https://github.com/danbulant/Shasha
synced 2026-06-07 08:32:16 +00:00
hm
This commit is contained in:
parent
44e099f530
commit
cd3985547c
3 changed files with 9 additions and 8 deletions
|
|
@ -26,19 +26,19 @@ module.exports = class profile extends commando.Command {
|
||||||
if (!arg) TM = msg.author; else TM = getUser(msg, arg);
|
if (!arg) TM = msg.author; else TM = getUser(msg, arg);
|
||||||
if (!TM) return trySend(msg.client, msg, "Bro stop lookin for yo imaginary gf");
|
if (!TM) return trySend(msg.client, msg, "Bro stop lookin for yo imaginary gf");
|
||||||
const MEM = msg.guild.member(TM),
|
const MEM = msg.guild.member(TM),
|
||||||
emb = defaultImageEmbed(msg, null, `\`${TM.tag}\`'s Profile`);
|
emb = defaultImageEmbed(msg, null, `\`${TM.tag}\`'s Profile`);
|
||||||
emb
|
emb
|
||||||
.setThumbnail(TM.displayAvatarURL({format: "png", size: 4096, dynamic: true}))
|
.setThumbnail(TM.displayAvatarURL({ format: "png", size: 4096, dynamic: true }))
|
||||||
.addField("Registered", TM.createdAt.toUTCString().slice(0, -4), true)
|
.addField("Registered", TM.createdAt.toUTCString().slice(0, -4), true)
|
||||||
.addField("ID", TM.id, true);
|
.addField("ID", TM.id, true);
|
||||||
if (msg.author.description) {
|
if (TM.description) {
|
||||||
emb.setDescription(TM.description);
|
emb.setDescription(TM.description);
|
||||||
}
|
}
|
||||||
if (MEM) {
|
if (MEM) {
|
||||||
const RI = MEM.roles.cache.sort((a, b) => b.position - a.position).map(r => r.id).slice(0, -1),
|
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))
|
emb.addField("Joined", MEM.joinedAt.toUTCString().slice(0, -4))
|
||||||
.addField("Nick", `\`${MEM.displayName}\``);
|
.addField("Nick", `\`${MEM.displayName}\``);
|
||||||
if (RFS[0]?.length > 0) {
|
if (RFS[0]?.length > 0) {
|
||||||
for (const p of RFS) {
|
for (const p of RFS) {
|
||||||
emb.addField(emb.fields.length === 4 ? "Roles" : "", "<@&" + p.join(">, <@&") + ">");
|
emb.addField(emb.fields.length === 4 ? "Roles" : "", "<@&" + p.join(">, <@&") + ">");
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ module.exports = async (msg) => {
|
||||||
let check = false;
|
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.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) {
|
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;
|
if (!log || !msg.author) return;
|
||||||
const emb = defaultEventLogEmbed(msg.guild);
|
const emb = defaultEventLogEmbed(msg.guild);
|
||||||
emb.setColor(getColor("yellow"))
|
emb.setColor(getColor("yellow"))
|
||||||
|
|
|
||||||
|
|
@ -478,6 +478,7 @@ function getUser(msg, key) {
|
||||||
const use = cleanMentionID(key);
|
const use = cleanMentionID(key);
|
||||||
let u;
|
let u;
|
||||||
if (/^\d{17,19}$/.test(use)) u = msg.client.users.cache.get(use);
|
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;
|
if (!u) u = getMember(msg.guild, use)?.[0].user;
|
||||||
return u;
|
return u;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue