From 8e9bee751ce911479c5d122b2572b94edddb3619 Mon Sep 17 00:00:00 2001 From: Jacob Henry Date: Sun, 3 Mar 2019 20:46:36 -0500 Subject: [PATCH] Variable name clarification --- hooks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks.py b/hooks.py index e797533..3e30cf5 100644 --- a/hooks.py +++ b/hooks.py @@ -174,7 +174,7 @@ class InteractionListener(AbsHook): self.message_ts = message_ts self.lifetime = lifetime self.start_time = time() - self.on_death = on_expire + self.on_expire = on_expire self.dead = False def try_apply(self, event: slack_util.Event) -> Optional[MsgAction]: @@ -184,8 +184,8 @@ class InteractionListener(AbsHook): # If so, give up the ghost if self.dead or should_expire: - if self.on_death: - self.on_death() + if self.on_expire and should_expire: # Call on_expire callback if we expired and it exists + self.on_expire() raise HookDeath() # Next make sure we've got an interaction