mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-16 07:18:54 +00:00
Connect reaction watcher
This commit is contained in:
parent
486bd6b88d
commit
d8305df52a
1 changed files with 5 additions and 1 deletions
|
@ -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::<ReactionWatcher>().send(reaction);
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
Loading…
Add table
Reference in a new issue