From 76b20d9697134904ded7608ba72377a967985297 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Sat, 19 Jul 2025 22:14:57 -0700 Subject: [PATCH] fix: we actually need to save the config --- src/commands/config.ts | 14 ++++++++++++++ src/events/interactionCreate.ts | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/commands/config.ts b/src/commands/config.ts index be17b33..df5b16e 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -58,6 +58,20 @@ export const config: Command = async(sorielle, interaction) => { return; } const seconds = interaction.options.getInteger("timeout", true); + await sorielle.database.vents.upsert({ + create: { + channelId: channel.id, + serverId: interaction.guild.id, + ttl: seconds, + }, + update: { + channelId: channel.id, + ttl: seconds, + }, + where: { + serverId: interaction.guild.id, + }, + }); const components = [ new ContainerBuilder().addTextDisplayComponents( new TextDisplayBuilder().setContent( diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 2fbc412..589e62b 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -15,7 +15,7 @@ const handlers: { _default: Command } & Record = { content: `Unknown command: ${interaction.commandName}`, }); }, - about: about, + about: about, configure: config, };