From d8305df52aac84d89af39347afa1ac3def01a7af Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Thu, 6 Feb 2020 19:32:21 -0500 Subject: [PATCH] Connect reaction watcher --- youmubot/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/youmubot/src/main.rs b/youmubot/src/main.rs index 54e765b..bff0c7a 100644 --- a/youmubot/src/main.rs +++ b/youmubot/src/main.rs @@ -2,7 +2,7 @@ use dotenv; use dotenv::var; use serenity::{ framework::standard::{DispatchError, StandardFramework}, - model::{channel::Message, gateway}, + model::{channel::{Message, Reaction}, gateway}, }; use youmubot_prelude::*; @@ -25,6 +25,10 @@ impl EventHandler for Handler { println!("{:?}", message); self.hooks.iter().for_each(|f| f(&mut ctx, &message)); } + + fn reaction_add(&self, ctx: Context, reaction: Reaction) { + ctx.data.get_cloned::().send(reaction); + } } fn main() {