diff options
| author | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2022-12-31 22:48:40 +0400 |
|---|---|---|
| committer | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2022-12-31 22:48:40 +0400 |
| commit | 46fd26962ef55f8b557f7e36d3aee915a819c88c (patch) | |
| tree | 18038653ee532831aca0000afa7849924c2c63cc /exes/cache/src/managers/automoderation.rs | |
| parent | 0fcc68291a5f7526dbeffe33f4a84a649200e847 (diff) | |
add base of cache component
Diffstat (limited to 'exes/cache/src/managers/automoderation.rs')
| -rw-r--r-- | exes/cache/src/managers/automoderation.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/exes/cache/src/managers/automoderation.rs b/exes/cache/src/managers/automoderation.rs new file mode 100644 index 0000000..4a1b119 --- /dev/null +++ b/exes/cache/src/managers/automoderation.rs @@ -0,0 +1,26 @@ +use twilight_model::gateway::event::DispatchEvent; + +use crate::CacheSourcedEvents; + +use super::CacheManager; +use std::future::Future; + +#[derive(Default)] +pub struct Automoderation {} +impl CacheManager for Automoderation { + fn handle( + &self, + event: twilight_model::gateway::event::DispatchEvent, + ) -> std::pin::Pin<Box<dyn Future<Output = crate::CacheSourcedEvents>>> { + Box::pin(async move { + match event { + DispatchEvent::AutoModerationRuleCreate(_) => {} + DispatchEvent::AutoModerationRuleDelete(_) => {} + DispatchEvent::AutoModerationRuleUpdate(_) => {} + _ => unreachable!(), + }; + + CacheSourcedEvents::None + }) + } +} |
