Reaction watcher with fixed duration

This commit is contained in:
Natsu Kagami 2020-05-25 11:15:03 -04:00
parent 6ce110c203
commit 3e42c74c78
Signed by: nki
GPG key ID: 73376E117CD20735
2 changed files with 26 additions and 2 deletions

View file

@ -95,7 +95,7 @@ pub fn vote(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult {
let reaction_to_choice: Map<_, _> = choices.iter().map(|r| (r.0, &r.1)).collect();
let mut user_reactions: Map<UserId, Vec<&str>> = Map::new();
ctx.data.get_cloned::<ReactionWatcher>().handle_reactions(
ctx.data.get_cloned::<ReactionWatcher>().handle_reactions_timed(
|reaction: &Reaction, is_add| {
if reaction.message_id != panel.id {
return Ok(());