Skip to content

Commit

Permalink
Merge pull request #2151 from sopel-irc/invite-catch-exception
Browse files Browse the repository at this point in the history
invite: handle expected possible exception
  • Loading branch information
dgw authored Jul 6, 2021
2 parents 31ccf77 + a61afe9 commit 8f38990
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sopel/modules/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 8f38990

Please sign in to comment.