diff options
Diffstat (limited to '')
| -rw-r--r-- | src/commands/autocomplete.rs | 5 |
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 | ||
| 210 | pub async fn trigger_name(ctx: Context<'_>, partial: &str) -> Vec<String> { | 210 | pub 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() |
