Improved command parser for wrong command syntax

This commit is contained in:
lomion 2020-07-20 14:07:19 +02:00
parent fbaf6c6666
commit 03a63987ef
2 changed files with 4 additions and 2 deletions

View file

@ -95,7 +95,7 @@ class TestTmdbMethods(unittest.TestCase):
def test_cast(self): def test_cast(self):
movie = TvShow() movie = TvShow()
movie.search_title('The Flash') movie.search_title('The Flash')
self.assertEqual('Tom Cavanagh', movie.cast[0]) self.assertEqual('Grant Gustin', movie.cast[0])
self.assertEqual('Carlos Valdes', movie.cast[2]) self.assertEqual('Carlos Valdes', movie.cast[2])
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -207,4 +207,6 @@ class TmdbBot(Plugin):
else: else:
await self.send_notice(evt, 'Syntax wrong: !tmdb id {movie|tvshow} {tmdb id}') await self.send_notice(evt, 'Syntax wrong: !tmdb id {movie|tvshow} {tmdb id}')
else: else:
await self.send_notice(evt, 'Command unknown!') await self.send_help(evt)
else:
await self.send_help(evt)