mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Bot-specific for bot users in !userinfo (#260)
This commit is contained in:
parent
f2f246ee84
commit
6cddcb9074
1 changed files with 8 additions and 7 deletions
|
@ -36,7 +36,7 @@ export async function getUserInfoEmbed(
|
||||||
const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin);
|
const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin);
|
||||||
|
|
||||||
embed.author = {
|
embed.author = {
|
||||||
name: `User: ${user.tag}`,
|
name: `${user.bot ? "Bot" : "User"}: ${user.tag}`,
|
||||||
};
|
};
|
||||||
|
|
||||||
const avatarURL = user.displayAvatarURL();
|
const avatarURL = user.displayAvatarURL();
|
||||||
|
@ -54,7 +54,7 @@ export async function getUserInfoEmbed(
|
||||||
|
|
||||||
if (compact) {
|
if (compact) {
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: preEmbedPadding + "User information",
|
name: preEmbedPadding + `${user.bot ? "Bot" : "User"} information`,
|
||||||
value: trimLines(`
|
value: trimLines(`
|
||||||
Profile: <@!${user.id}>
|
Profile: <@!${user.id}>
|
||||||
Created: **${accountAge} ago** (\`${prettyCreatedAt}\`)
|
Created: **${accountAge} ago** (\`${prettyCreatedAt}\`)
|
||||||
|
@ -70,11 +70,12 @@ export async function getUserInfoEmbed(
|
||||||
largest: 2,
|
largest: 2,
|
||||||
round: true,
|
round: true,
|
||||||
});
|
});
|
||||||
embed.fields[0].value += `\nJoined: **${joinAge} ago** (\`${prettyJoinedAt}\`)`;
|
|
||||||
|
embed.fields[0].value += `\n${user.bot ? "Added" : "Joined"}: **${joinAge} ago** (\`${prettyJoinedAt}\`)`;
|
||||||
} else {
|
} else {
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: preEmbedPadding + "!! NOTE !!",
|
name: preEmbedPadding + "!! NOTE !!",
|
||||||
value: "User is not on the server",
|
value: `${user.bot ? "Bot" : "User"} is not on the server`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +83,7 @@ export async function getUserInfoEmbed(
|
||||||
}
|
}
|
||||||
|
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: preEmbedPadding + "User information",
|
name: preEmbedPadding + `${user.bot ? "Bot" : "User"} information`,
|
||||||
value: trimLines(`
|
value: trimLines(`
|
||||||
Name: **${user.tag}**
|
Name: **${user.tag}**
|
||||||
ID: \`${user.id}\`
|
ID: \`${user.id}\`
|
||||||
|
@ -107,7 +108,7 @@ export async function getUserInfoEmbed(
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: preEmbedPadding + "Member information",
|
name: preEmbedPadding + "Member information",
|
||||||
value: trimLines(`
|
value: trimLines(`
|
||||||
Joined: **${joinAge} ago** (\`${prettyJoinedAt}\`)
|
${user.bot ? "Added" : "Joined"}: **${joinAge} ago** (\`${prettyJoinedAt}\`)
|
||||||
${roles.length > 0 ? "Roles: " + roles.map(r => `<@&${r.id}>`).join(", ") : ""}
|
${roles.length > 0 ? "Roles: " + roles.map(r => `<@&${r.id}>`).join(", ") : ""}
|
||||||
`),
|
`),
|
||||||
});
|
});
|
||||||
|
@ -126,7 +127,7 @@ export async function getUserInfoEmbed(
|
||||||
} else {
|
} else {
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: preEmbedPadding + "Member information",
|
name: preEmbedPadding + "Member information",
|
||||||
value: "⚠ User is not on the server",
|
value: `⚠ ${user.bot ? "Bot" : "User"} is not on the server`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const cases = (await pluginData.state.cases.getByUserId(user.id)).filter(c => !c.is_hidden);
|
const cases = (await pluginData.state.cases.getByUserId(user.id)).filter(c => !c.is_hidden);
|
||||||
|
|
Loading…
Add table
Reference in a new issue