Fixed panicking on missing permissions

This commit is contained in:
Evann Regnault 2022-08-02 02:40:46 +02:00
parent 5533527979
commit 813de17f59

View file

@ -37,9 +37,12 @@ pub async fn update_status_message(ctx: Context) {
match msg {
Ok(mut m) => {
let copies = copy_embed(&embeds);
m.edit(&ctx.http, |f| {
match m.edit(&ctx.http, |f| {
f.set_embeds(copies)
}).await.unwrap();
}).await {
Ok(_) => {},
Err(e) => println!("Error while editing message {}", e)
}
}
Err(_) => {