From 9eb5113dc50d289edc8a228097febce2e2a56d36 Mon Sep 17 00:00:00 2001 From: Kiran Rubin Date: Mon, 19 Oct 2026 23:43:32 +0300 Subject: [PATCH 1/9] fix(election): typo --- ...6a4fe2c8db962089f6171ff516e7edd6c9516732779.json} | 11 +++++++++-- src/commands.rs | 12 +++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) rename .sqlx/{query-f3d520befae1cf53ca6190159f7cbb036992d0e4d73f8fa4c3f756aa1fa65477.json => query-a80835b719070df4c5a326a4fe2c8db962089f6171ff516e7edd6c9516732779.json} (78%) diff --git a/.sqlx/query-f3d520befae1cf53ca6190159f7cbb036992d0e4d73f8fa4c3f756aa1fa65477.json b/.sqlx/query-a80835b719070df4c5a326a4fe2c8db962089f6171ff516e7edd6c9516732779.json similarity index 78% rename from .sqlx/query-f3d520befae1cf53ca6190159f7cbb036992d0e4d73f8fa4c3f756aa1fa65477.json rename to .sqlx/query-a80835b719070df4c5a326a4fe2c8db962089f6171ff516e7edd6c9516732779.json index 3251136..99be3ed 100644 --- a/.sqlx/query-f3d520befae1cf53ca6190159f7cbb036992d0e4d73f8fa4c3f756aa1fa65477.json +++ b/.sqlx/query-a80835b719070df4c5a326a4fe2c8db962089f6171ff516e7edd6c9516732779.json @@ -1,6 +1,6 @@ { "db_name": "SQLite", - "query": "SELECT\n e.*,\n (\n SELECT COUNT(*)\n FROM candidates c\n WHERE c.election_id = e.id\n ) AS candidate_count,\n (\n SELECT COUNT(DISTINCT v.voter_id) \n FROM votes v\n WHERE v.election_id = e.id\n ) AS voter_count\n FROM elections e\n ORDER BY e.started_at DESC\n LIMIT 1", + "query": "SELECT\n e.*,\n (\n SELECT COUNT(*)\n FROM candidates c\n WHERE c.election_id = e.id\n ) AS candidate_count,\n (\n SELECT COUNT(DISTINCT v.voter_id)\n FROM votes v\n WHERE v.election_id = e.id\n ) AS voter_count,\n (\n SELECT COUNT(*)\n FROM votes v\n WHERE v.election_id = e.id\n ) AS vote_count\n FROM elections e\n ORDER BY e.started_at DESC\n LIMIT 1", "describe": { "columns": [ { @@ -80,6 +80,12 @@ "ordinal": 7, "type_info": "Integer", "origin": "Expression" + }, + { + "name": "vote_count", + "ordinal": 8, + "type_info": "Integer", + "origin": "Expression" } ], "parameters": { @@ -93,8 +99,9 @@ false, false, false, + false, false ] }, - "hash": "f3d520befae1cf53ca6190159f7cbb036992d0e4d73f8fa4c3f756aa1fa65477" + "hash": "a80835b719070df4c5a326a4fe2c8db962089f6171ff516e7edd6c9516732779" } diff --git a/src/commands.rs b/src/commands.rs index fc9c73f..c0c5af6 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -21,10 +21,15 @@ pub async fn election(ctx: Context<'_>) -> Result<(), Error> { WHERE c.election_id = e.id ) AS candidate_count, ( - SELECT COUNT(DISTINCT v.voter_id) + SELECT COUNT(DISTINCT v.voter_id) FROM votes v WHERE v.election_id = e.id - ) AS voter_count + ) AS voter_count, + ( + SELECT COUNT(*) + FROM votes v + WHERE v.election_id = e.id + ) AS vote_count FROM elections e ORDER BY e.started_at DESC LIMIT 1" @@ -63,11 +68,12 @@ pub async fn election(ctx: Context<'_>) -> Result<(), Error> { .color(0x49b3a3); if !election.is_finished && ended_at > now { - embed = embed.footer(CreateEmbedFooter::new("Result's aren't calculated yet!")); + embed = embed.footer(CreateEmbedFooter::new("Results aren't calculated yet!")); } if ended_at < now { embed = embed.field("Voters", election.voter_count.to_string(), true); + embed = embed.field("Votes", election.vote_count.to_string(), true); } embed = embed.field("Kind", election.kind, false); From 25c9a4cd3b1429c79379ed1b0a39fe22ede7157d Mon Sep 17 00:00:00 2001 From: int4_t Date: Sat, 24 Oct 2026 14:57:32 +0300 Subject: [PATCH 2/9] feat(mod-log): add support for editing reason --- Cargo.lock | 1 + Cargo.toml | 1 + ...reason_response_id_to_mod_actions.down.sql | 1 + ...d_reason_response_id_to_mod_actions.up.sql | 1 + src/main.rs | 15 ++++ src/mod_log.rs | 88 ++++++++++++++++++- 6 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 migrations/20261023225846_add_reason_response_id_to_mod_actions.down.sql create mode 100644 migrations/20261023225846_add_reason_response_id_to_mod_actions.up.sql diff --git a/Cargo.lock b/Cargo.lock index 3814888..27f21ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -672,6 +672,7 @@ dependencies = [ "proptest", "rand 0.10.2", "rayon", + "regex", "reqwest 0.13.4", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index ee6654a..7650f00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ mimalloc = "0.1.52" poise = { version = "0.6.2", default-features = false, features = ["cache", "handle_panics"] } rand = "0.10.2" rayon = "1.12.0" +regex = "1.13.1" reqwest = { version = "0.13.4", features = ["json"] } serde = { version = "1.0.229", features = ["derive"] } serde_json = "1.0.151" diff --git a/migrations/20261023225846_add_reason_response_id_to_mod_actions.down.sql b/migrations/20261023225846_add_reason_response_id_to_mod_actions.down.sql new file mode 100644 index 0000000..cb74e2e --- /dev/null +++ b/migrations/20261023225846_add_reason_response_id_to_mod_actions.down.sql @@ -0,0 +1 @@ +ALTER TABLE mod_actions DROP COLUMN reason_response_id; diff --git a/migrations/20261023225846_add_reason_response_id_to_mod_actions.up.sql b/migrations/20261023225846_add_reason_response_id_to_mod_actions.up.sql new file mode 100644 index 0000000..b6df26b --- /dev/null +++ b/migrations/20261023225846_add_reason_response_id_to_mod_actions.up.sql @@ -0,0 +1 @@ +ALTER TABLE mod_actions ADD COLUMN reason_response_id INTEGER; diff --git a/src/main.rs b/src/main.rs index b1ab7d6..040359e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -220,6 +220,21 @@ async fn handle_event( sleep(StdDuration::from_secs(15)).await; let _ = temporary?.delete(&ctx.http).await; } + } else if let FullEvent::MessageUpdate { + old_if_available: _, + new: _, + event, + } = event + { + let msg = event + .channel_id + .message(&ctx.http(), event.id.get()) + .await?; + + if event.guild_id.is_none() { + mod_log::edit_dm(ctx, &msg, data).await?; + return Ok(()); + } } else if let FullEvent::GuildAuditLogEntryCreate { guild_id, entry } = event && guild_id.get() == config.guild_id { diff --git a/src/mod_log.rs b/src/mod_log.rs index b7486a5..e08f166 100644 --- a/src/mod_log.rs +++ b/src/mod_log.rs @@ -1,3 +1,6 @@ +use std::sync::LazyLock; + +use regex::Regex; use serenity::{ all::prelude::CacheHttp, builder::{CreateAllowedMentions, CreateMessage, EditMessage}, @@ -9,6 +12,10 @@ use serenity::{ }; use tracing::{debug, instrument, warn}; +static QUOTE_CONTENT_RE: LazyLock = LazyLock::new(|| Regex::new(r"«([^»]*)»").unwrap()); +static ZSWPQUOTE_RE: LazyLock = LazyLock::new(|| Regex::new(r"\u{200B}[«»]").unwrap()); +static QUOTE_RE: LazyLock = LazyLock::new(|| Regex::new(r"[«»]").unwrap()); + use crate::{Data, Error}; #[instrument(skip(ctx, data), err)] @@ -245,8 +252,9 @@ pub async fn handle_dm( if let Some(action) = action { sqlx::query!( - "UPDATE mod_actions SET reason = ? WHERE id = ?", + "UPDATE mod_actions SET reason = ?, reason_response_id = ? WHERE id = ?", message.content, + message.id.get() as i64, action.id ) .execute(&pool) @@ -259,7 +267,10 @@ pub async fn handle_dm( let edit = EditMessage::new() .content(log.content.replace( "no reason specified", - &format!("reason «{}»", message.content.clone()), + &format!( + "reason «{}»", + QUOTE_RE.replace_all(&message.content.clone(), "\u{200B}$0") + ), )) .allowed_mentions( CreateAllowedMentions::new() @@ -290,3 +301,76 @@ pub async fn handle_dm( Ok(()) } + +#[instrument(skip(ctx, data, message), err)] +pub async fn edit_dm( + ctx: &serenity::client::Context, + message: &Message, + data: &Data, +) -> Result<(), Error> { + let config = data.config.clone(); + let pool = data.pool.clone(); + + let action = sqlx::query!( + r"SELECT id, mod_log_id, reason_ask_id FROM mod_actions + WHERE mod_id = ? AND reason_response_id = ? + ORDER BY id DESC", + message.author.id.get() as i64, + message.id.get() as i64, + ) + .fetch_optional(&pool) + .await?; + + if let Some(action) = action { + sqlx::query!( + "UPDATE mod_actions SET reason = ? WHERE id = ?", + message.content, + action.id + ) + .execute(&pool) + .await?; + + if let Some(msg) = action.mod_log_id { + let msg = MessageId::new(msg as u64); + let channel = ChannelId::new(config.mod_log_id); + let log = channel.message(&ctx.http(), msg).await?; + let edit = EditMessage::new() + .content(QUOTE_CONTENT_RE.replace( + &ZSWPQUOTE_RE.replace_all(&log.content, ""), + format!( + "«{}»", + QUOTE_RE.replace_all(&message.content.clone(), "\u{200B}$0") + ), + )) + .allowed_mentions( + CreateAllowedMentions::new() + .empty_users() + .empty_roles() + .everyone(false), + ); + channel.edit_message(&ctx.http(), log, edit).await?; + } else { + warn!("failed to update mod log"); + } + + if let Some(msg) = action.reason_ask_id { + let umsg = msg as u64; + let prev_ask_msg = message.channel_id.message(&ctx.http(), umsg).await?; + + let edit = EditMessage::new().content(format!("{}!", prev_ask_msg.content)); + message + .channel_id + .edit_message(&ctx.http(), umsg, edit) + .await?; + } else { + warn!("failed to update ask"); + } + } else if !message.author.bot { + message + .channel_id + .say(&ctx.http(), "Yo what are you editing about?") + .await?; + } + + Ok(()) +} From 9f5fc6507761deea8540c96b4d31d4bf6a41d832 Mon Sep 17 00:00:00 2001 From: int4_t Date: Sat, 24 Oct 2026 15:23:31 +0300 Subject: [PATCH 3/9] feat(mod-log): support attachments --- src/mod_log.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/mod_log.rs b/src/mod_log.rs index e08f166..90c3aee 100644 --- a/src/mod_log.rs +++ b/src/mod_log.rs @@ -3,7 +3,9 @@ use std::sync::LazyLock; use regex::Regex; use serenity::{ all::prelude::CacheHttp, - builder::{CreateAllowedMentions, CreateMessage, EditMessage}, + builder::{ + CreateAllowedMentions, CreateAttachment, CreateMessage, EditAttachments, EditMessage, + }, model::{ channel::Message, guild::audit_log::AuditLogEntry, @@ -264,6 +266,12 @@ pub async fn handle_dm( let msg = MessageId::new(msg as u64); let channel = ChannelId::new(config.mod_log_id); let log = channel.message(&ctx.http(), msg).await?; + let mut edit_attachs = EditAttachments::new(); + for att in &message.attachments { + let bytes = att.download().await?; + let attachment = CreateAttachment::bytes(bytes, &att.filename); + edit_attachs = edit_attachs.add(attachment); + } let edit = EditMessage::new() .content(log.content.replace( "no reason specified", @@ -272,6 +280,7 @@ pub async fn handle_dm( QUOTE_RE.replace_all(&message.content.clone(), "\u{200B}$0") ), )) + .attachments(edit_attachs) .allowed_mentions( CreateAllowedMentions::new() .empty_users() @@ -334,6 +343,12 @@ pub async fn edit_dm( let msg = MessageId::new(msg as u64); let channel = ChannelId::new(config.mod_log_id); let log = channel.message(&ctx.http(), msg).await?; + let mut edit_attachs = EditAttachments::new(); + for att in &message.attachments { + let bytes = att.download().await?; + let attachment = CreateAttachment::bytes(bytes, &att.filename); + edit_attachs = edit_attachs.add(attachment); + } let edit = EditMessage::new() .content(QUOTE_CONTENT_RE.replace( &ZSWPQUOTE_RE.replace_all(&log.content, ""), @@ -342,6 +357,7 @@ pub async fn edit_dm( QUOTE_RE.replace_all(&message.content.clone(), "\u{200B}$0") ), )) + .attachments(edit_attachs) .allowed_mentions( CreateAllowedMentions::new() .empty_users() From 7c8f8965e205dfde4a0c2556e56344aafb123716 Mon Sep 17 00:00:00 2001 From: int4_t Date: Sat, 24 Oct 2026 15:53:08 +0300 Subject: [PATCH 4/9] fix(mod-log): add a max redownload attachment size --- src/main.rs | 1 + src/mod_log.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/main.rs b/src/main.rs index 040359e..cef3049 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,6 +51,7 @@ pub struct Config { council: CouncilConfig, union: HashMap, poll: Option, + max_attach_redownload_size: u32, // in bytes, stored in memory } #[derive(Deserialize, Clone)] diff --git a/src/mod_log.rs b/src/mod_log.rs index 90c3aee..5f856ec 100644 --- a/src/mod_log.rs +++ b/src/mod_log.rs @@ -268,6 +268,9 @@ pub async fn handle_dm( let log = channel.message(&ctx.http(), msg).await?; let mut edit_attachs = EditAttachments::new(); for att in &message.attachments { + if att.size > config.max_attach_redownload_size { + continue; + } let bytes = att.download().await?; let attachment = CreateAttachment::bytes(bytes, &att.filename); edit_attachs = edit_attachs.add(attachment); @@ -345,6 +348,9 @@ pub async fn edit_dm( let log = channel.message(&ctx.http(), msg).await?; let mut edit_attachs = EditAttachments::new(); for att in &message.attachments { + if att.size > config.max_attach_redownload_size { + continue; + } let bytes = att.download().await?; let attachment = CreateAttachment::bytes(bytes, &att.filename); edit_attachs = edit_attachs.add(attachment); From d5aed89e2b19ce42c2b44e588164400ad3dea4c5 Mon Sep 17 00:00:00 2001 From: Kiran Rubin Date: Sat, 24 Oct 2026 16:14:39 +0300 Subject: [PATCH 5/9] chore: sqlx prepare --- ...25c48e8c0b3d7005311129fdd68ab2c4dcd02.json | 50 +++++++++++++++++++ ...921af330da85e97df0c7733802db18e3bebf2.json | 12 +++++ 2 files changed, 62 insertions(+) create mode 100644 .sqlx/query-6c494c412486e6b8a03dc02986325c48e8c0b3d7005311129fdd68ab2c4dcd02.json create mode 100644 .sqlx/query-c4042a2e022b60756a97ea1aa1e921af330da85e97df0c7733802db18e3bebf2.json diff --git a/.sqlx/query-6c494c412486e6b8a03dc02986325c48e8c0b3d7005311129fdd68ab2c4dcd02.json b/.sqlx/query-6c494c412486e6b8a03dc02986325c48e8c0b3d7005311129fdd68ab2c4dcd02.json new file mode 100644 index 0000000..6199570 --- /dev/null +++ b/.sqlx/query-6c494c412486e6b8a03dc02986325c48e8c0b3d7005311129fdd68ab2c4dcd02.json @@ -0,0 +1,50 @@ +{ + "db_name": "SQLite", + "query": "SELECT id, mod_log_id, reason_ask_id FROM mod_actions\n WHERE mod_id = ? AND reason_response_id = ?\n ORDER BY id DESC", + "describe": { + "columns": [ + { + "name": "id", + "ordinal": 0, + "type_info": "Integer", + "origin": { + "Table": { + "table": "mod_actions", + "name": "id" + } + } + }, + { + "name": "mod_log_id", + "ordinal": 1, + "type_info": "Integer", + "origin": { + "Table": { + "table": "mod_actions", + "name": "mod_log_id" + } + } + }, + { + "name": "reason_ask_id", + "ordinal": 2, + "type_info": "Integer", + "origin": { + "Table": { + "table": "mod_actions", + "name": "reason_ask_id" + } + } + } + ], + "parameters": { + "Right": 2 + }, + "nullable": [ + false, + true, + true + ] + }, + "hash": "6c494c412486e6b8a03dc02986325c48e8c0b3d7005311129fdd68ab2c4dcd02" +} diff --git a/.sqlx/query-c4042a2e022b60756a97ea1aa1e921af330da85e97df0c7733802db18e3bebf2.json b/.sqlx/query-c4042a2e022b60756a97ea1aa1e921af330da85e97df0c7733802db18e3bebf2.json new file mode 100644 index 0000000..bc77f72 --- /dev/null +++ b/.sqlx/query-c4042a2e022b60756a97ea1aa1e921af330da85e97df0c7733802db18e3bebf2.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE mod_actions SET reason = ?, reason_response_id = ? WHERE id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 3 + }, + "nullable": [] + }, + "hash": "c4042a2e022b60756a97ea1aa1e921af330da85e97df0c7733802db18e3bebf2" +} From dbe30de60dd5eaba4ccec9849b09b428111a8848 Mon Sep 17 00:00:00 2001 From: Kiran Rubin Date: Sat, 24 Oct 2026 16:14:47 +0300 Subject: [PATCH 6/9] fix: default value for max_attach_redownload_size --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index cef3049..28542d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,9 +51,14 @@ pub struct Config { council: CouncilConfig, union: HashMap, poll: Option, + #[serde(default = "default_max_attach_redownload_size")] // 12 megs max_attach_redownload_size: u32, // in bytes, stored in memory } +fn default_max_attach_redownload_size() -> u32 { + 12681408 +} + #[derive(Deserialize, Clone)] #[serde(default)] struct ActivityConfig { From 741ad678b6931832c97384ddf4edee10d17568f0 Mon Sep 17 00:00:00 2001 From: int4_t Date: Mon, 26 Oct 2026 14:56:46 +0200 Subject: [PATCH 7/9] fix: add reasons for changing roles --- src/main.rs | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/src/main.rs b/src/main.rs index 28542d1..6cfee59 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use ::serenity::{ gateway::ActivityData, model::{ channel::MessageType, - id::{ChannelId, GuildId, UserId}, + id::{ChannelId, GuildId, RoleId, UserId}, }, }; use ewectionbot::pav::{self, TieSituation}; @@ -1328,9 +1328,13 @@ async fn schedule_end_of_election( .await?; for person in people_out { - if let Ok(member) = guild_id.member(&http, person as u64).await { - member.remove_role(&http, config.council.role_id).await?; - } + http.remove_member_role( + guild_id, + UserId::new(person as u64), + RoleId::new(config.council.role_id), + Some("removing former council members"), + ) + .await?; } for winner in winners { @@ -1342,9 +1346,13 @@ async fn schedule_end_of_election( .execute(&mut *tx) .await?; - if let Ok(member) = guild_id.member(&http, winner).await { - member.add_role(&http, config.council.role_id).await?; - } + http.add_member_role( + guild_id, + UserId::new(winner), + RoleId::new(config.council.role_id), + Some("adding new council members"), + ) + .await?; } tx.commit().await?; @@ -2092,9 +2100,13 @@ async fn main() -> Result<(), Box> { .filter(|member| member.roles.contains(&config.council.role_id.into())); for person in fake_council { - if let Ok(member) = guild_id.member(&http, person.user.id.get()).await { - member.remove_role(&http, config.council.role_id).await?; - } + http.remove_member_role( + guild_id, + person.user.id, + RoleId::new(config.council.role_id), + Some("unfucking council: removing all council members"), + ) + .await?; } let real_council = sqlx::query_scalar!( @@ -2107,9 +2119,13 @@ async fn main() -> Result<(), Box> { .await?; for person in &real_council { - if let Ok(member) = guild_id.member(&http, *person as u64).await { - member.add_role(&http, config.council.role_id).await?; - } + http.add_member_role( + guild_id, + UserId::new(*person as u64), + RoleId::new(config.council.role_id), + Some("unfucking council: adding all council members from db"), + ) + .await?; } return Ok(()); From ae7b9d77cb372868065dad1434ca3dbe08264f8e Mon Sep 17 00:00:00 2001 From: Kiran Rubin Date: Tue, 17 Nov 2026 21:57:45 +0200 Subject: [PATCH 8/9] feat: resign --- Cargo.toml | 1 - src/main.rs | 30 +++++++++++++----------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7650f00..4b087b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ license-file = "LICENSE" [features] default = [] -resign = [] [dependencies] bitvec = "1.1.1" diff --git a/src/main.rs b/src/main.rs index 6cfee59..c30526b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -401,7 +401,6 @@ pub async fn activity( } /// Resign from your Council position -#[cfg(feature = "resign")] #[instrument(skip(ctx), err)] #[poise::command(slash_command, prefix_command)] pub async fn resign(ctx: Context<'_>) -> Result<(), Error> { @@ -454,21 +453,6 @@ pub async fn resign(ctx: Context<'_>) -> Result<(), Error> { Ok(()) } -/// Resign from your Council position -#[cfg(not(feature = "resign"))] -#[instrument(skip(ctx), err)] -#[poise::command(slash_command, prefix_command)] -pub async fn resign(ctx: Context<'_>) -> Result<(), Error> { - ctx.send( - poise::CreateReply::default() - .content("This feature isn't done yet, only available in debug builds") - .ephemeral(true), - ) - .await?; - - Ok(()) -} - /// Get the current Council status #[instrument(skip(ctx), err)] #[poise::command(slash_command, prefix_command)] @@ -656,7 +640,19 @@ async fn handle_resign_component( ), ) .await?; - // TODO: trigger a by-election + + ctx.http + .remove_member_role( + GuildId::from(config.guild_id), + user.id, + RoleId::new(config.council.role_id), + Some("removing resigned council member"), + ) + .await?; + + if let Err(e) = maybe_create_by_election(pool, config, ctx.http.clone()).await { + error!("Failed to trigger a by-election: {e}"); + } } _ => {} } From 5ec7f987f353c80aa47927126822dfd63e0481bb Mon Sep 17 00:00:00 2001 From: Kiran Rubin Date: Tue, 17 Nov 2026 22:05:48 +0200 Subject: [PATCH 9/9] chore: sqlx prepare --- ...98d3dc68318568c8b0d87d03778b387212520.json | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .sqlx/query-c74328cadb06d199340dcb0330f98d3dc68318568c8b0d87d03778b387212520.json diff --git a/.sqlx/query-c74328cadb06d199340dcb0330f98d3dc68318568c8b0d87d03778b387212520.json b/.sqlx/query-c74328cadb06d199340dcb0330f98d3dc68318568c8b0d87d03778b387212520.json new file mode 100644 index 0000000..7dc1394 --- /dev/null +++ b/.sqlx/query-c74328cadb06d199340dcb0330f98d3dc68318568c8b0d87d03778b387212520.json @@ -0,0 +1,26 @@ +{ + "db_name": "SQLite", + "query": "\n SELECT term_start FROM council_members\n WHERE user_id = ? AND term_end IS NULL\n ", + "describe": { + "columns": [ + { + "name": "term_start", + "ordinal": 0, + "type_info": "Text", + "origin": { + "Table": { + "table": "council_members", + "name": "term_start" + } + } + } + ], + "parameters": { + "Right": 1 + }, + "nullable": [ + false + ] + }, + "hash": "c74328cadb06d199340dcb0330f98d3dc68318568c8b0d87d03778b387212520" +}