Fixed docker containers
This commit is contained in:
@@ -56,7 +56,7 @@ pub async fn run(ctx: &Context, command: &CommandInteraction) {
|
||||
Ok(channel_id) => {
|
||||
log::debug!("<{guild_id}> Play command executed on {channel_id} with track: {track_url:?}");
|
||||
// Handle the track url
|
||||
match enqueue_track(ctx, manager, guild_id.to_owned(), track_url, true).await {
|
||||
match enqueue_track(ctx, manager, guild_id.to_owned(), track_url).await {
|
||||
Ok(count) => {
|
||||
let mut message = format!("Playing {} tracks", count);
|
||||
if count == 0 {
|
||||
@@ -84,7 +84,6 @@ pub async fn enqueue_track(
|
||||
manager: Arc<Songbird>,
|
||||
guild_id: GuildId,
|
||||
track_url: &str,
|
||||
play_now: bool,
|
||||
) -> SirenResult<i32> {
|
||||
let mut track_count = 0;
|
||||
if let Some(handler_lock) = manager.get(guild_id) {
|
||||
@@ -140,7 +139,6 @@ pub async fn enqueue_track(
|
||||
}
|
||||
};
|
||||
let track_handle: TrackHandle;
|
||||
let is_queue_empty = handler.queue().is_empty();
|
||||
track_handle = handler.enqueue_input(input).await;
|
||||
// Set the volume
|
||||
let _ = track_handle.set_volume(volume);
|
||||
@@ -156,8 +154,8 @@ pub async fn enqueue_track(
|
||||
);
|
||||
track_count += 1;
|
||||
}
|
||||
if play_now && !handler.queue().is_empty() {
|
||||
handler.queue().resume();
|
||||
if handler.queue().is_empty() {
|
||||
let _ = handler.queue().resume();
|
||||
}
|
||||
}
|
||||
Ok(track_count)
|
||||
|
||||
Reference in New Issue
Block a user