From d583d1b32b1ca3f550de48c48dd0bc6c8fd240d5 Mon Sep 17 00:00:00 2001 From: paring Date: Tue, 6 Jan 2026 01:27:30 +0900 Subject: [PATCH] fix: script setter --- src/bot/modal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot/modal.rs b/src/bot/modal.rs index 4fdf3eb..2a7d3cd 100644 --- a/src/bot/modal.rs +++ b/src/bot/modal.rs @@ -42,7 +42,7 @@ impl Handler { .and_then(|x| x.value.clone()) .context("unable to get value text from input")?; - sqlx::query("update guilds set script = $1 where id = $2") + sqlx::query("insert into guilds (id, script) values ($1, $2) on conflict do update set script = excluded.script") .bind(value.as_str()) .bind(guild_id.to_string()) .execute(&self.db)