aboutsummaryrefslogtreecommitdiffstats
path: root/src/commands/autocomplete.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 01:09:10 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 01:09:10 +0100
commitceb96326ccf3daff0472cafdaba3e223d3a20724 (patch)
tree8bd84f484ce714bd10f1c9f25f612ab16fbd8eae /src/commands/autocomplete.rs
parentcron: scope jobs to the guild that created them (diff)
downloadsenator-sperma-ceb96326ccf3daff0472cafdaba3e223d3a20724.tar.gz
senator-sperma-ceb96326ccf3daff0472cafdaba3e223d3a20724.zip
triggers: scope groups to the guild that created them
Diffstat (limited to '')
-rw-r--r--src/commands/autocomplete.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/commands/autocomplete.rs b/src/commands/autocomplete.rs
index a909738..d05a48b 100644
--- a/src/commands/autocomplete.rs
+++ b/src/commands/autocomplete.rs
@@ -208,8 +208,11 @@ pub async fn any_file(ctx: Context<'_>, partial: &str) -> Vec<serenity::Autocomp
208} 208}
209 209
210pub async fn trigger_name(ctx: Context<'_>, partial: &str) -> Vec<String> { 210pub async fn trigger_name(ctx: Context<'_>, partial: &str) -> Vec<String> {
211 let Some(guild_id) = ctx.guild_id() else {
212 return Vec::new();
213 };
211 let db_pool = &ctx.data().db_pool; 214 let db_pool = &ctx.data().db_pool;
212 match crate::database::list_triggers(db_pool).await { 215 match crate::database::list_triggers(db_pool, guild_id.get() as i64).await {
213 Ok(triggers) => { 216 Ok(triggers) => {
214 let names: Vec<_> = triggers 217 let names: Vec<_> = triggers
215 .into_iter() 218 .into_iter()