From 15232b1598fd3af924e8bad749f2e8eeb1519394 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Mon, 10 Feb 2020 19:09:37 -0500 Subject: [PATCH] Reset the cooldown everytime there is an action --- youmubot-prelude/src/reaction_watch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youmubot-prelude/src/reaction_watch.rs b/youmubot-prelude/src/reaction_watch.rs index 44faba2..2eb9b05 100644 --- a/youmubot-prelude/src/reaction_watch.rs +++ b/youmubot-prelude/src/reaction_watch.rs @@ -60,8 +60,8 @@ impl ReactionWatcher { { self.channels.lock().expect("Poisoned!").push(send); } - let timeout = after(duration); loop { + let timeout = after(duration); let r = select! { recv(reactions) -> r => { let (r, is_added) = r.unwrap(); h.handle_reaction(&*r, is_added) }, recv(timeout) -> _ => break,