mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 07:05:36 +01:00
Fix autocomplete
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user