Bug fixes and ~~performance~~ typing improvements
diff --git a/src/events/roleCreate.ts b/src/events/roleCreate.ts
index f0051a0..f1b0a91 100644
--- a/src/events/roleCreate.ts
+++ b/src/events/roleCreate.ts
@@ -1,20 +1,10 @@
export const event = "roleCreate";
export async function callback(client, role) {
- const {
- getAuditLog,
- log,
- NucleusColors,
- entry,
- renderUser,
- renderDelta,
- renderRole
- } = role.client.logger;
+ const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderRole } = role.client.logger;
if (role.managed) return;
const auditLog = await getAuditLog(role.guild, "ROLE_CREATE");
- const audit = auditLog.entries
- .filter((entry) => entry.target.id === role.id)
- .first();
+ const audit = auditLog.entries.filter((entry) => entry.target.id === role.id).first();
if (audit.executor.id === client.user.id) return;
const data = {
meta: {
@@ -29,10 +19,7 @@
roleId: entry(role.id, `\`${role.id}\``),
role: entry(role.name, renderRole(role)),
createdBy: entry(audit.executor.id, renderUser(audit.executor)),
- created: entry(
- role.createdTimestamp,
- renderDelta(role.createdTimestamp)
- )
+ created: entry(role.createdTimestamp, renderDelta(role.createdTimestamp))
},
hidden: {
guild: role.guild.id