restructured a lot. everything updated to poise.
This commit is contained in:
@ -1,6 +1,24 @@
|
||||
use crate::{models::sound::SoundCtx, Context};
|
||||
|
||||
pub mod info;
|
||||
pub mod manage;
|
||||
pub mod play;
|
||||
// pub mod search;
|
||||
// pub mod settings;
|
||||
// pub mod stop;
|
||||
pub mod search;
|
||||
pub mod settings;
|
||||
pub mod stop;
|
||||
|
||||
pub async fn autocomplete_sound(
|
||||
ctx: Context<'_>,
|
||||
partial: String,
|
||||
) -> Vec<poise::AutocompleteChoice<String>> {
|
||||
ctx.data()
|
||||
.autocomplete_user_sounds(&partial, ctx.author().id, ctx.guild_id().unwrap())
|
||||
.await
|
||||
.unwrap_or(vec![])
|
||||
.iter()
|
||||
.map(|s| poise::AutocompleteChoice {
|
||||
name: s.name.clone(),
|
||||
value: s.id.to_string(),
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
Reference in New Issue
Block a user