Fix autocompletes
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use log::warn;
|
||||
|
||||
use crate::{cmds::autocomplete_sound, models::sound::SoundCtx, Context, Error};
|
||||
use crate::{cmds::autocomplete_favorite, models::sound::SoundCtx, Context, Error};
|
||||
|
||||
#[poise::command(slash_command, rename = "favorites", guild_only = true)]
|
||||
pub async fn favorites(_ctx: Context<'_>) -> Result<(), Error> {
|
||||
@ -16,9 +16,7 @@ pub async fn favorites(_ctx: Context<'_>) -> Result<(), Error> {
|
||||
)]
|
||||
pub async fn add_favorite(
|
||||
ctx: Context<'_>,
|
||||
#[description = "Name or ID of sound to favorite"]
|
||||
#[autocomplete = "autocomplete_sound"]
|
||||
name: String,
|
||||
#[description = "Name or ID of sound to favorite"] name: String,
|
||||
) -> Result<(), Error> {
|
||||
let sounds = ctx
|
||||
.data()
|
||||
@ -61,7 +59,7 @@ pub async fn add_favorite(
|
||||
pub async fn remove_favorite(
|
||||
ctx: Context<'_>,
|
||||
#[description = "Name or ID of sound to favorite"]
|
||||
#[autocomplete = "autocomplete_sound"]
|
||||
#[autocomplete = "autocomplete_favorite"]
|
||||
name: String,
|
||||
) -> Result<(), Error> {
|
||||
let sounds = ctx
|
||||
|
Reference in New Issue
Block a user