Add docs for the servers sub-module of groups
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//! The event handlers for the servers sub-module.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
@@ -14,6 +16,7 @@ use crate::{
|
||||
state::State,
|
||||
};
|
||||
|
||||
/// Adds servers to the DB when they get created.
|
||||
#[derive(Debug)]
|
||||
pub struct ServerCreateHandler;
|
||||
|
||||
@@ -43,6 +46,7 @@ impl OnServerCreateHandler<State> for ServerCreateHandler {
|
||||
}
|
||||
}
|
||||
|
||||
/// Updates DB server data when a server gets updated.
|
||||
#[derive(Debug)]
|
||||
pub struct ServerUpdateHandler;
|
||||
|
||||
@@ -74,6 +78,7 @@ impl OnServerUpdateHandler<State> for ServerUpdateHandler {
|
||||
}
|
||||
}
|
||||
|
||||
/// Deletes servers from the DB when they get deleted or payphone is kicked.
|
||||
#[derive(Debug)]
|
||||
pub struct ServerDeleteHandler;
|
||||
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
//! Payphone's Discord server-related features.
|
||||
//!
|
||||
//! This sub-module is responsible for registering servers in the database, updating them when they
|
||||
//! update, and removing them when they get deleted or Payphone is kicked.
|
||||
|
||||
pub mod events;
|
||||
|
||||
Reference in New Issue
Block a user