Skip to content

Commit

Permalink
insert default on join
Browse files Browse the repository at this point in the history
  • Loading branch information
tazz4843 committed Apr 16, 2024
1 parent 5b2eccf commit bad74c8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripty_audio_handler/src/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ pub async fn connect_to_vc(
};
debug!(%guild_id, ?premium_tier, "leave delta: {}", leave_delta);

// insert default
sqlx::query!(
"INSERT INTO guilds (guild_id) VALUES ($1) ON CONFLICT DO NOTHING",
guild_id.get() as i64
)
.execute(scripty_db::get_db())
.await?;

// fetch automod
debug!(%guild_id, "fetching automod");
let automod_server_cfg = scripty_automod::db::get_guild_config(guild_id.get())
Expand Down

0 comments on commit bad74c8

Please sign in to comment.