use serenity::all::{CommandInteraction, Context}; use serenity::builder::{CreateCommand, CreateEmbed}; use crate::music::music_manager; use crate::util::embed::Embed; pub async unsafe fn run(ctx: &Context, command: &CommandInteraction) -> CreateEmbed { let username = command.user.name.as_str(); let guild_id = match &command.guild_id { Some(guild_id) => guild_id, None => { return Embed::create(username, "GuildId not found", "Could not find guild id."); } }; music_manager::attempt_to_stop(&ctx, &guild_id, &command.user.id, &command.user.name).await } pub fn register() -> CreateCommand { CreateCommand::new("stop").description("Stop playing and start leavin'") } // >18/02/2024 @ 19:01:59 - bartlo // >2024-02-19 17:58:39 | moonleay