use serde::Deserialize;
use crate::{
models::{Id, Server},
Context, Result,
};
#[derive(Debug, Deserialize, Clone, PartialEq)]
pub struct ServerRoleDeleteEvent {
#[serde(rename = "id")]
pub server_id: Id,
pub role_id: Id,
}
impl ServerRoleDeleteEvent {
pub async fn server(&self, cx: &Context) -> Result<Server> {
Server::fetch(cx, &self.server_id).await
}
}