moved announcement message unpinning

This commit is contained in:
2022-05-23 16:21:22 +02:00
parent 141d97d278
commit 112424d27a
+4 -4
View File
@@ -156,6 +156,10 @@ pub async fn run_contest(
if contest.counts.is_empty() { if contest.counts.is_empty() {
announcement.delete(&ctx.http).await?; announcement.delete(&ctx.http).await?;
} else { } else {
if pin_announcement {
announcement.unpin(&ctx.http).await?;
}
// send ranking message // send ranking message
channel_id channel_id
.send_message(&ctx.http, |m| { .send_message(&ctx.http, |m| {
@@ -177,9 +181,5 @@ pub async fn run_contest(
.await?; .await?;
} }
if pin_announcement {
announcement.unpin(&ctx.http).await?;
}
Ok(()) Ok(())
} }