I hereby decree that this document shall no longer contain the substring " == ", and hereafter shall be referred to as " === ". This amendment shall take effect immediately.
Signed-off-by: pineafan <pineapplefanyt@gmail.com>
diff --git a/src/events/threadUpdate.ts b/src/events/threadUpdate.ts
index 4e13193..8550ffe 100644
--- a/src/events/threadUpdate.ts
+++ b/src/events/threadUpdate.ts
@@ -5,20 +5,20 @@
try {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = after.client.logger
let auditLog = await getAuditLog(after.guild, 'THREAD_UPDATE');
- let audit = auditLog.entries.filter(entry => entry.target.id == after.id).first();
- if (audit.executor.id == client.user.id) return;
+ let audit = auditLog.entries.filter(entry => entry.target.id === after.id).first();
+ if (audit.executor.id === client.user.id) return;
let list = {
threadId:entry(after.id, `\`${after.id}\``),
thread: entry(after.name, renderChannel(after)),
parentChannel: entry(after.parentId, renderChannel(after.parent)),
}
- if (before.name != after.name) {
+ if (before.name !== after.name) {
list["name"] = entry([before.name, after.name], `${before.name} -> ${after.name}`);
}
- if (before.autoArchiveDuration != after.autoArchiveDuration) {
+ if (before.autoArchiveDuration !== after.autoArchiveDuration) {
list["autoArchiveDuration"] = entry([before.autoArchiveDuration, after.autoArchiveDuration], `${humanizeDuration(before.autoArchiveDuration * 60 * 1000, { round: true })} -> ${humanizeDuration(after.autoArchiveDuration * 60 * 1000, { round: true })}`);
}
- if (before.rateLimitPerUser != after.rateLimitPerUser) {
+ if (before.rateLimitPerUser !== after.rateLimitPerUser) {
list["slowmode"] = entry([before.rateLimitPerUser, after.rateLimitPerUser], `${humanizeDuration(before.rateLimitPerUser * 1000)} -> ${humanizeDuration(after.rateLimitPerUser * 1000)}`);
}
if (!(Object.keys(list).length - 3)) return;