Re-implementing the API
This commit is contained in:
@@ -2,7 +2,7 @@ use std::sync::Arc;
|
||||
|
||||
use serenity::all::{CommandInteraction, CommandOptionType, CreateCommand, CreateCommandOption};
|
||||
use serenity::model::prelude::GuildId;
|
||||
use serenity::{prelude::*, async_trait, futures};
|
||||
use serenity::{prelude::*, async_trait};
|
||||
use songbird::input::{Input, YoutubeDl};
|
||||
use songbird::tracks::TrackHandle;
|
||||
use songbird::{Event, EventHandler, Songbird, TrackEvent};
|
||||
@@ -25,7 +25,7 @@ pub async fn run(ctx: &Context, command: &CommandInteraction) {
|
||||
"{} attempted to play a track without a track option",
|
||||
command.user.id.get()
|
||||
);
|
||||
create_message_response(&ctx, &command, format!("Track option is missing"), false).await;
|
||||
create_message_response(&ctx, &command, "Track option is missing".to_string(), false).await;
|
||||
return;
|
||||
}
|
||||
};
|
||||
@@ -53,7 +53,9 @@ pub async fn run(ctx: &Context, command: &CommandInteraction) {
|
||||
// Join the user's voice channel
|
||||
match join_voice_channel(&ctx.cache, &manager, guild_id, &command.user).await {
|
||||
Ok(channel_id) => {
|
||||
log::debug!("<{guild_id}> Play command executed on channel {channel_id} with track: {track_url:?}");
|
||||
log::debug!(
|
||||
"<{guild_id}> Play command executed on channel {channel_id} with track: {track_url:?}"
|
||||
);
|
||||
// Handle the track url
|
||||
match enqueue_track(ctx, manager, guild_id.to_owned(), track_url).await {
|
||||
Ok(items) => {
|
||||
|
||||
Reference in New Issue
Block a user