Still got errors and warnings, mostly the same and easy to fix
diff --git a/src/events/roleCreate.ts b/src/events/roleCreate.ts
index 2f159ac..a717242 100644
--- a/src/events/roleCreate.ts
+++ b/src/events/roleCreate.ts
@@ -1,31 +1,29 @@
-export const event = 'roleCreate'
+export const event = "roleCreate";
export async function callback(client, role) {
- try {
- const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderRole } = role.client.logger
- if (role.managed) return;
- let auditLog = await getAuditLog(role.guild, 'ROLE_CREATE');
- let audit = auditLog.entries.filter(entry => entry.target.id === role.id).first();
- if (audit.executor.id === client.user.id) return;
- let data = {
- meta: {
- type: 'roleCreate',
- displayName: 'Role Created',
- calculateType: 'guildRoleUpdate',
- color: NucleusColors.green,
- emoji: "GUILD.ROLES.CREATE",
- timestamp: role.createdTimestamp
- },
- list: {
- 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))
- },
- hidden: {
- guild: role.guild.id
- }
+ 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();
+ if (audit.executor.id === client.user.id) return;
+ const data = {
+ meta: {
+ type: "roleCreate",
+ displayName: "Role Created",
+ calculateType: "guildRoleUpdate",
+ color: NucleusColors.green,
+ emoji: "GUILD.ROLES.CREATE",
+ timestamp: role.createdTimestamp
+ },
+ list: {
+ 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))
+ },
+ hidden: {
+ guild: role.guild.id
}
- log(data);
- } catch {}
+ };
+ log(data);
}