From a61afe9b5264c99bfc3eccd075ab0fab709df5ec Mon Sep 17 00:00:00 2001 From: dgw Date: Mon, 5 Jul 2021 13:26:22 -0500 Subject: [PATCH] invite: handle expected possible exception Avoids "Unknown error" output to IRC and exception traceback log dump. --- sopel/modules/invite.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sopel/modules/invite.py b/sopel/modules/invite.py index fcd3654bd0..2aaf2da936 100644 --- a/sopel/modules/invite.py +++ b/sopel/modules/invite.py @@ -76,4 +76,7 @@ def invite(bot, trigger): .format(bot.config.core.help_prefix)) channel = trigger.sender - invite_handler(bot, trigger.nick, user, channel) + try: + invite_handler(bot, trigger.nick, user, channel) + except ValueError as err: + bot.reply('%s' % err)