forked from DiscordBots/Rustendo
fix: bug fixes
This commit is contained in:
parent
ed89386ed9
commit
05fae26549
4 changed files with 76 additions and 30 deletions
|
@ -3,17 +3,22 @@ use crate::util::embed::Embed;
|
|||
use serenity::all::{CommandInteraction, Context};
|
||||
use serenity::builder::{CreateCommand, CreateEmbed};
|
||||
|
||||
pub async unsafe fn run(ctx: &Context, command: &CommandInteraction) -> CreateEmbed {
|
||||
pub async 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_error_respose(username, "guild_id not found", "Could not find guild id.");
|
||||
return Embed::create_error_respose(
|
||||
username,
|
||||
"guild_id not found",
|
||||
"Could not find guild id.",
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
music_manager::attempt_to_skip_current_song(ctx, guild_id, &command.user.id, &command.user.name).await
|
||||
music_manager::attempt_to_skip_current_song(ctx, guild_id, &command.user.id, &command.user.name)
|
||||
.await
|
||||
}
|
||||
|
||||
pub fn register() -> CreateCommand {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue