Fix a bunch of linter errors
diff --git a/src/events/guildUpdate.ts b/src/events/guildUpdate.ts
index 2cb1de8..2c87807 100644
--- a/src/events/guildUpdate.ts
+++ b/src/events/guildUpdate.ts
@@ -4,9 +4,12 @@
export async function callback(client, before, after) {
await statsChannelUpdate(client, after.me);
- const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta } = after.client.logger;
+ const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta } =
+ after.client.logger;
const auditLog = await getAuditLog(after, "GUILD_UPDATE");
- const audit = auditLog.entries.filter(entry => entry.target.id === after.id).first();
+ const audit = auditLog.entries
+ .filter((entry) => entry.target.id === after.id)
+ .first();
if (audit.executor.id === client.user.id) return;
const list = {};
@@ -29,18 +32,65 @@
ELEVATED: "Enabled"
};
- if (before.name !== after.name) list["name"] = entry([before.name, after.name], `${before.name} -> ${after.name}`);
- if (before.icon !== after.icon) list["icon"] = entry([before.icon, after.icon], `[Before](${before.iconURL()}) -> [After](${after.iconURL()})`);
- if (before.splash !== after.splash) list["splash"] = entry([before.splash, after.splash], `[Before](${before.splashURL()}) -> [After](${after.splashURL()})`);
- if (before.banner !== after.banner) list["banner"] = entry([before.banner, after.banner], `[Before](${before.bannerURL()}) -> [After](${after.bannerURL()})`);
- if (before.owner !== after.owner) list["owner"] = entry([before.owner, after.owner], `${renderUser(before.owner.user)} -> ${renderUser(after.owner.user)}`);
- if (before.verificationLevel !== after.verificationLevel) list["verificationLevel"] = entry([verificationLevels[before.verificationLevel], verificationLevels[after.verificationLevel]], `${verificationLevels[before.verificationLevel]} -> ${verificationLevels[after.verificationLevel]}`);
- if (before.explicitContentFilter !== after.explicitContentFilter) list["explicitContentFilter"] = entry([explicitContentFilterLevels[before.explicitContentFilter], explicitContentFilterLevels[after.explicitContentFilter]], `${explicitContentFilterLevels[before.explicitContentFilter]} -> ${explicitContentFilterLevels[after.explicitContentFilter]}`);
- if (before.mfaLevel !== after.mfaLevel) list["2 factor authentication"] = entry([MFALevels[before.mfaLevel], MFALevels[after.mfaLevel]], `${MFALevels[before.mfaLevel]} -> ${MFALevels[after.mfaLevel]}`);
+ if (before.name !== after.name)
+ list.name = entry(
+ [before.name, after.name],
+ `${before.name} -> ${after.name}`
+ );
+ if (before.icon !== after.icon)
+ list.icon = entry(
+ [before.icon, after.icon],
+ `[Before](${before.iconURL()}) -> [After](${after.iconURL()})`
+ );
+ if (before.splash !== after.splash)
+ list.splash = entry(
+ [before.splash, after.splash],
+ `[Before](${before.splashURL()}) -> [After](${after.splashURL()})`
+ );
+ if (before.banner !== after.banner)
+ list.banner = entry(
+ [before.banner, after.banner],
+ `[Before](${before.bannerURL()}) -> [After](${after.bannerURL()})`
+ );
+ if (before.owner !== after.owner)
+ list.owner = entry(
+ [before.owner, after.owner],
+ `${renderUser(before.owner.user)} -> ${renderUser(
+ after.owner.user
+ )}`
+ );
+ if (before.verificationLevel !== after.verificationLevel)
+ list.verificationLevel = entry(
+ [
+ verificationLevels[before.verificationLevel],
+ verificationLevels[after.verificationLevel]
+ ],
+ `${verificationLevels[before.verificationLevel]} -> ${
+ verificationLevels[after.verificationLevel]
+ }`
+ );
+ if (before.explicitContentFilter !== after.explicitContentFilter)
+ list.explicitContentFilter = entry(
+ [
+ explicitContentFilterLevels[before.explicitContentFilter],
+ explicitContentFilterLevels[after.explicitContentFilter]
+ ],
+ `${explicitContentFilterLevels[before.explicitContentFilter]} -> ${
+ explicitContentFilterLevels[after.explicitContentFilter]
+ }`
+ );
+ if (before.mfaLevel !== after.mfaLevel)
+ list["2 factor authentication"] = entry(
+ [MFALevels[before.mfaLevel], MFALevels[after.mfaLevel]],
+ `${MFALevels[before.mfaLevel]} -> ${MFALevels[after.mfaLevel]}`
+ );
- if (!(Object.keys(list).length)) return;
- list["updated"] = entry(new Date().getTime(), renderDelta(new Date().getTime()));
- list["updatedBy"] = entry(audit.executor.id, renderUser(audit.executor));
+ if (!Object.keys(list).length) return;
+ list.updated = entry(
+ new Date().getTime(),
+ renderDelta(new Date().getTime())
+ );
+ list.updatedBy = entry(audit.executor.id, renderUser(audit.executor));
const data = {
meta: {
type: "guildUpdate",