diff --git a/plugins/labhub.py b/plugins/labhub.py index e9b2f54b..9402909c 100644 --- a/plugins/labhub.py +++ b/plugins/labhub.py @@ -72,7 +72,7 @@ def TEAMS(self, new): self._teams = new # Ignore LineLengthBear, PycodestyleBear - @re_botcmd(pattern=r'^(?:(?:welcome)|(?:inv)|(?:invite))\s+(?:(?:@?([\w-]+)(?:\s*(?:to)\s+(\w+))?)|(me))$', + @re_botcmd(pattern=r'^(?:(?:welcome)|(?:inv)|(?:invite))\s+(?:(?:@?([\w-]+)(?:\s+(?:to)\s+(\w+))?)|(me))$', re_cmd_name_help='invite ([@] [to ]|me)') def invite_cmd(self, msg, match): """ diff --git a/tests/labhub_test.py b/tests/labhub_test.py index ac5362d9..7bf87eab 100644 --- a/tests/labhub_test.py +++ b/tests/labhub_test.py @@ -59,6 +59,8 @@ def test_invite_cmd(self): testbot.assertCommand('!invite meet to developers', ':poop:') + testbot.assertCommand('!invite meetto newcomers', + 'Command "invite" / "invite meetto" not found.') def test_hello_world_callback(self): teams = { 'coala newcomers': self.mock_team,