From 818b504ec5db845e94a2830bb2bf3cdce9366603 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 11 Apr 2019 18:37:58 +0200 Subject: [PATCH] Change error message in TelegramCall.get_author --- royalnet/bots/telegram.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/royalnet/bots/telegram.py b/royalnet/bots/telegram.py index 2cacaafa..236fd9bc 100644 --- a/royalnet/bots/telegram.py +++ b/royalnet/bots/telegram.py @@ -75,7 +75,7 @@ class TelegramBot: user: telegram.User = update.effective_user if user is None: if error_if_none: - raise UnregisteredError("Author is not registered!") + raise UnregisteredError("No author for this message") return None query = call.session.query(self.master_table) for link in self.identity_chain: @@ -83,7 +83,7 @@ class TelegramBot: query = query.filter(self.identity_column == user.id) result = await asyncify(query.one_or_none) if result is None and error_if_none: - raise UnregisteredError("Author is not registered!") + raise UnregisteredError("Author is not registered") return result self.TelegramCall = TelegramCall