plus: remove handler once it has been consumed
This commit is contained in:
parent
95cc864474
commit
33dab48706
|
@ -22,7 +22,7 @@ class PlusPlugin(Plugin):
|
||||||
if not self.should_handle_command(event.arguments[0], no_content=True):
|
if not self.should_handle_command(event.arguments[0], no_content=True):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if handler := self.handlers.get(event.target):
|
if handler := self.handlers.pop(event.target, None):
|
||||||
handler(event)
|
handler(event)
|
||||||
else:
|
else:
|
||||||
self.signal_failure(event.target)
|
self.signal_failure(event.target)
|
||||||
|
|
Loading…
Reference in a new issue