diff --git a/plugins/Reply.py b/plugins/Reply.py index bd9e578..9585004 100644 --- a/plugins/Reply.py +++ b/plugins/Reply.py @@ -6,8 +6,10 @@ class ReplyPlugin(PluginBase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - def run(self, text, target=None, _ctx=None, **kwargs): - msg = SysMessage(self._name, text.format(event=_ctx)) + def run(self, text, target=None, display=False, _ctx=None, **kwargs): + if isinstance(text, str): + text = text.format(event=_ctx) + msg = SysMessage(self._name, text) if target == 'all': self.broadcast(msg) @@ -17,3 +19,6 @@ class ReplyPlugin(PluginBase): self.call_chat(target, msg) else: logger.error('Calling plugin did not provide required context and no explicit target set') + + if display: + self.send_to_bus(msg)