Variable name clarification

This commit is contained in:
Jacob Henry 2019-03-03 20:46:36 -05:00
parent fc407d0c48
commit 8e9bee751c
1 changed files with 3 additions and 3 deletions

View File

@ -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