/// This handles the deletion of a message
/// First it check whether the message is reported
/// After that it proceeds accordingly.
/// If a reported message is deleted the deletion time will be logged into the embed-chain
This handles the deletion of a message
First it check whether the message is reported
After that it proceeds accordingly.
If a reported message is deleted the deletion time will be logged into the embed-chain
This handles the deletion of a message First it check whether the message is reported After that it proceeds accordingly . If a reported message is deleted the deletion time will be logged into the embed - chain
pub async fn handle_delete(ctx: &Context, message_id: MessageId) {
    if !is_reported(ctx, message_id.0).await {
        return;
    }
    let db = ctx.get_db().await;
    let voting_event = db.get_voting_event_for_message(message_id.0).await.unwrap();
    db.message_deleted(
        chrono::Local::now().naive_local(),
        voting_event.vote_message_id,
    )
    .await
    .unwrap();
    update_voting_message(ctx, voting_event.vote_message_id as u64).await;
}
pub async fn handle_delete ( ctx : & Context , message_id : MessageId ) { if ! is_reported ( ctx , message_id . 0 ) . await { return ; } let db = ctx . get_db ( ) . await ; let voting_event = db . get_voting_event_for_message ( message_id . 0 ) . await . unwrap ( ) ; db . message_deleted ( chrono :: Local :: now ( ) . naive_local ( ) , voting_event . vote_message_id , ) . await . unwrap ( ) ; update_voting_message ( ctx , voting_event . vote_message_id as u64 ) . await ; }
This handles the deletion of a message
First it check whether the message is reported
After that it proceeds accordingly.
This handles the deletion of a message First it check whether the message is reported After that it proceeds accordingly .
ctx
&Context
message_id
MessageId