3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 00:05:04 +00:00

Add embed color, copieable mention, permissions

This commit is contained in:
Jonathan B 2020-10-08 21:04:21 +02:00
parent 8ff2b6614c
commit 3aaf012008

View file

@ -26,6 +26,8 @@ export async function getRoleInfoEmbed(
// icon_url: icon,
// };
embed.color = role.color;
const createdAt = moment.utc(role.createdAt, "x");
const timeAndDate = pluginData.getPlugin(TimeAndDatePlugin);
const tzCreatedAt = requestMemberId
@ -37,6 +39,12 @@ export async function getRoleInfoEmbed(
round: true
});
let rolePermsArray : Array<string> = [];
for (const [x, _x] of Object.entries(role.permissions.json)) {
rolePermsArray.push(x.toString())
}
const rolePerms = rolePermsArray.join(', ')
embed.fields.push({
name: preEmbedPadding + "Role information",
value: trimLines(`
@ -48,9 +56,9 @@ export async function getRoleInfoEmbed(
Mentionable: ${role.mentionable}
Hoisted: ${role.hoist}
Managed: ${role.managed}
Permissions: TODO
Permissions: ${rolePerms}
Members: TODO
Mention: <@&${role.id}>
Mention: <@&${role.id}> (\`<@&${role.id}>\`)
`),
});