From 6d344474d3d9e44121cd8c33654af309323f9192 Mon Sep 17 00:00:00 2001 From: Almeida Date: Wed, 5 May 2021 02:17:33 +0100 Subject: [PATCH] renamed mention icon variable and added comment to first rolePerms replace --- backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts index b7e90236..216b3991 100644 --- a/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts +++ b/backend/src/plugins/Utility/functions/getRoleInfoEmbed.ts @@ -6,7 +6,7 @@ import moment from "moment-timezone"; import humanizeDuration from "humanize-duration"; import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin"; -const MENTION = "https://cdn.discordapp.com/attachments/705009450855039042/839284872152481792/mention.png"; +const MENTION_ICON = "https://cdn.discordapp.com/attachments/705009450855039042/839284872152481792/mention.png"; export async function getRoleInfoEmbed( pluginData: GuildPluginData, @@ -19,7 +19,7 @@ export async function getRoleInfoEmbed( embed.author = { name: `Role: ${role.name}`, - icon_url: MENTION, + icon_url: MENTION_ICON, }; embed.color = role.color; @@ -38,6 +38,7 @@ export async function getRoleInfoEmbed( const rolePerms = Object.keys(role.permissions.json) .map(p => p + // Voice channel related permission names start with 'voice' .replace(/^voice/i, "") .replace(/([a-z])([A-Z])/g, "$1 $2") .toLowerCase()