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, };