Fix autocomplete

This commit is contained in:
2024-08-05 19:33:18 +02:00
parent 73bccedbc9
commit 4b1024eb9a

View File

@@ -93,9 +93,11 @@ impl EventHandler for Handler {
games
.iter()
.filter(|game| game.to_lowercase().contains(&query.to_lowercase()))
.take(25)
.map(|game| {
AutocompleteChoice::new(game.to_string(), game.to_string())
}).collect()
})
.collect()
);
let _ = interaction.create_response(&ctx.http, serenity::builder::CreateInteractionResponse::Autocomplete(autocompolete_response)).await.unwrap();