Skip to content
Snippets Groups Projects

Starboard counts

Merged Stephen D requested to merge starboard_counts into master
Files
6
+ 9
2
@@ -35,7 +35,8 @@ pub(crate) trait LineHandler: Send + Sync {
#[async_trait]
pub(crate) trait ReactionHandler: Send + Sync {
async fn reaction(&self, _ctx: &Context, reaction: &Reaction);
async fn reaction_add(&self, ctx: &Context, reaction: &Reaction);
async fn reaction_del(&self, ctx: &Context, reaction: &Reaction);
}
pub(crate) struct Dispatcher {
@@ -53,7 +54,13 @@ impl EventHandler for Dispatcher {
async fn reaction_add(&self, ctx: Context, reaction: Reaction) {
for r in &self.reacts {
r.reaction(&ctx, &reaction).await;
r.reaction_add(&ctx, &reaction).await;
}
}
async fn reaction_remove(&self, ctx: Context, reaction: Reaction) {
for r in &self.reacts {
r.reaction_del(&ctx, &reaction).await;
}
}
Loading