restructured a lot. everything updated to poise.

This commit is contained in:
2022-01-26 20:33:51 +00:00
parent bb54c0d2c0
commit b350007dae
15 changed files with 775 additions and 757 deletions

View File

@ -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()
}