mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-20 00:05:04 +00:00
prettier
This commit is contained in:
parent
3aaf012008
commit
d3e619796c
1 changed files with 10 additions and 10 deletions
|
@ -15,17 +15,17 @@ export async function getRoleInfoEmbed(
|
||||||
if (!role) {
|
if (!role) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const embed: EmbedOptions = {
|
const embed: EmbedOptions = {
|
||||||
fields: []
|
fields: [],
|
||||||
}
|
};
|
||||||
|
|
||||||
// TODO Perhaps use a '@' as icon?
|
// TODO Perhaps use a '@' as icon?
|
||||||
// embed.author = {
|
// embed.author = {
|
||||||
// name: role.name,
|
// name: role.name,
|
||||||
// icon_url: icon,
|
// icon_url: icon,
|
||||||
// };
|
// };
|
||||||
|
|
||||||
embed.color = role.color;
|
embed.color = role.color;
|
||||||
|
|
||||||
const createdAt = moment.utc(role.createdAt, "x");
|
const createdAt = moment.utc(role.createdAt, "x");
|
||||||
|
@ -36,14 +36,14 @@ export async function getRoleInfoEmbed(
|
||||||
const prettyCreatedAt = tzCreatedAt.format(timeAndDate.getDateFormat("pretty_datetime"));
|
const prettyCreatedAt = tzCreatedAt.format(timeAndDate.getDateFormat("pretty_datetime"));
|
||||||
const roleAge = humanizeDuration(Date.now() - role.createdAt, {
|
const roleAge = humanizeDuration(Date.now() - role.createdAt, {
|
||||||
largest: 2,
|
largest: 2,
|
||||||
round: true
|
round: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
let rolePermsArray : Array<string> = [];
|
let rolePermsArray: Array<string> = [];
|
||||||
for (const [x, _x] of Object.entries(role.permissions.json)) {
|
for (const [x, _x] of Object.entries(role.permissions.json)) {
|
||||||
rolePermsArray.push(x.toString())
|
rolePermsArray.push(x.toString());
|
||||||
}
|
}
|
||||||
const rolePerms = rolePermsArray.join(', ')
|
const rolePerms = rolePermsArray.join(", ");
|
||||||
|
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: preEmbedPadding + "Role information",
|
name: preEmbedPadding + "Role information",
|
||||||
|
@ -61,6 +61,6 @@ export async function getRoleInfoEmbed(
|
||||||
Mention: <@&${role.id}> (\`<@&${role.id}>\`)
|
Mention: <@&${role.id}> (\`<@&${role.id}>\`)
|
||||||
`),
|
`),
|
||||||
});
|
});
|
||||||
|
|
||||||
return embed;
|
return embed;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue