fixed settings commands, todo's
diff --git a/src/events/guildMemberUpdate.ts b/src/events/guildMemberUpdate.ts
index 8889f57..d25c9c4 100644
--- a/src/events/guildMemberUpdate.ts
+++ b/src/events/guildMemberUpdate.ts
@@ -43,7 +43,7 @@
log(data);
} else if (
(before.communicationDisabledUntilTimestamp ?? 0) < new Date().getTime() &&
- (after.communicationDisabledUntil ?? 0) > new Date().getTime() // TODO: test this
+ (after.communicationDisabledUntil ?? 0) > new Date().getTime()
) {
await client.database.history.create(
"mute",
diff --git a/src/events/roleUpdate.ts b/src/events/roleUpdate.ts
index a728b79..09e062f 100644
--- a/src/events/roleUpdate.ts
+++ b/src/events/roleUpdate.ts
@@ -32,6 +32,12 @@
changes["mentionable"] = entry([oldRole.mentionable, newRole.mentionable], `${mentionable[0]} -> ${mentionable[1]}`);
if (oldRole.hexColor !== newRole.hexColor)
changes["color"] = entry([oldRole.hexColor, newRole.hexColor], `\`${oldRole.hexColor}\` -> \`${newRole.hexColor}\``);
+ if (oldRole.permissions.bitfield !== newRole.permissions.bitfield) {
+ changes["permissions"] = entry(
+ [oldRole.permissions.bitfield.toString(), newRole.permissions.bitfield.toString()],
+ `[[Old]](https://discordapi.com/permissions.html#${oldRole.permissions.bitfield.toString()}) -> [[New]](https://discordapi.com/permissions.html#${newRole.permissions.bitfield.toString()})`
+ );
+ }
if (Object.keys(changes).length === 4) return;
@@ -48,6 +54,6 @@
hidden: {
guild: newRole.guild.id
}
- }; // TODO: show perms changed (webpage)
+ }; // TODO: make our own page for this
log(data);
}