intermediate update
diff --git a/src/commands/settings/logs/attachment.ts b/src/commands/settings/logs/attachment.ts
index 6fb2461..e9e8dce 100644
--- a/src/commands/settings/logs/attachment.ts
+++ b/src/commands/settings/logs/attachment.ts
@@ -158,7 +158,7 @@
}
i.deferUpdate();
if ((i.component as unknown as ButtonInteraction).customId === "clear") {
- clicks += 1;
+ clicks ++;
if (clicks === 2) {
clicks = 0;
await client.database.guilds.write(interaction.guild!.id, null, ["logging.announcements.channel"]);
diff --git a/src/commands/settings/logs/channel.ts b/src/commands/settings/logs/channel.ts
index 9b594e8..0852e67 100644
--- a/src/commands/settings/logs/channel.ts
+++ b/src/commands/settings/logs/channel.ts
@@ -151,7 +151,7 @@
i = i!
i.deferUpdate();
if ((i.component as ButtonComponent).customId === "clear") {
- clicks += 1;
+ clicks ++;
if (clicks === 2) {
clicks = 0;
await client.database.guilds.write(interaction.guild!.id, null, ["logging.logs.channel"]);
diff --git a/src/commands/settings/logs/events.ts b/src/commands/settings/logs/events.ts
index fbe79fa..7332c7b 100644
--- a/src/commands/settings/logs/events.ts
+++ b/src/commands/settings/logs/events.ts
@@ -83,8 +83,8 @@
continue;
}
i.deferUpdate();
- if (i.customId === "logs") {
- const selected = (i as StringSelectMenuInteraction).values;
+ if (i.isStringSelectMenu() && i.customId === "logs") {
+ const selected = i.values;
const newLogs = toHexInteger(selected.map((e: string) => Object.keys(logs)[parseInt(e)]!));
await client.database.guilds.write(interaction.guild!.id, {
"logging.logs.toLog": newLogs
diff --git a/src/commands/settings/logs/staff.ts b/src/commands/settings/logs/staff.ts
index 3a0f395..d6379f0 100644
--- a/src/commands/settings/logs/staff.ts
+++ b/src/commands/settings/logs/staff.ts
@@ -155,7 +155,7 @@
}
i.deferUpdate();
if ((i.component as ButtonComponent).customId === "clear") {
- clicks += 1;
+ clicks ++;
if (clicks === 2) {
clicks = 0;
await client.database.guilds.write(interaction.guild.id, null, ["logging.staff.channel"]);