Fix now playing message not being updated

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/21/head
trivernis 3 years ago
parent be4e3cf02e
commit 50c457ac2e
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -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