serenity_additions/menu/
traits.rs1use crate::error::Result;
2use serenity::client::Context;
3use serenity::http::Http;
4use serenity::{async_trait, model::prelude::*};
5
6#[async_trait]
7pub trait EventDrivenMessage: Send + Sync {
8 fn is_frozen(&self) -> bool {
10 false
11 }
12
13 async fn update(&mut self, _http: &Http) -> Result<()> {
15 Ok(())
16 }
17
18 async fn on_deleted(&mut self, _ctx: &Context) -> Result<()> {
20 Ok(())
21 }
22
23 async fn on_reaction_add(&mut self, _ctx: &Context, _reaction: Reaction) -> Result<()> {
25 Ok(())
26 }
27
28 async fn on_reaction_remove(&mut self, _ctx: &Context, _reaction: Reaction) -> Result<()> {
30 Ok(())
31 }
32}