diff --git a/xbotlib.py b/xbotlib.py index 0acf7dd..8b9c6f6 100644 --- a/xbotlib.py +++ b/xbotlib.py @@ -232,12 +232,12 @@ class Bot(ClientXMPP): def reply(self, body, to=None, room=None): """Send back a reply.""" if to is None and room is None: - message = "`to` or `room` arguments required for `reply`" - raise RuntimeError(message) + self.log("`to` or `room` arguments required for `reply`") + exit(1) if to is not None and room is not None: - message = "Cannot send to both `to` and `room` for `reply`" - raise RuntimeError(message) + self.log.error("Cannot send to both `to` and `room` for `reply`") + exit(1) kwargs = {"mbody": body} if to is not None: