Merge pull request #21 from Trivernis/develop

Fix now playing message not being updated
pull/22/head
Trivernis 3 years ago committed by GitHub
commit 5e01211b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,6 @@
[package]
name = "bot-serenityutils"
version = "0.2.2"
version = "0.2.3"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"

@ -69,7 +69,9 @@ async fn play(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
while !play_next_in_queue(&ctx.http, &msg.channel_id, &queue, &handler_lock).await {}
}
if create_now_playing {
create_now_playing_msg(ctx, queue, msg.channel_id).await?;
let handle = create_now_playing_msg(ctx, queue.clone(), msg.channel_id).await?;
let mut queue_lock = queue.lock().await;
queue_lock.now_playing_msg = Some(handle);
}
handle_autodelete(ctx, msg).await?;

@ -60,7 +60,9 @@ async fn play_next(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
while !play_next_in_queue(&ctx.http, &msg.channel_id, &queue, &handler).await {}
}
if create_now_playing {
create_now_playing_msg(ctx, queue, msg.channel_id).await?;
let handle = create_now_playing_msg(ctx, queue.clone(), msg.channel_id).await?;
let mut queue_lock = queue.lock().await;
queue_lock.now_playing_msg = Some(handle);
}
handle_autodelete(ctx, msg).await?;

Loading…
Cancel
Save