From 03a63987ef3f3a6b9713add524320e67a2e54cca Mon Sep 17 00:00:00 2001 From: lomion Date: Mon, 20 Jul 2020 14:07:19 +0200 Subject: [PATCH] Improved command parser for wrong command syntax --- test_tmdb.py | 2 +- tmdb/tmdb.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test_tmdb.py b/test_tmdb.py index 574c8c9..ac8f3af 100644 --- a/test_tmdb.py +++ b/test_tmdb.py @@ -95,7 +95,7 @@ class TestTmdbMethods(unittest.TestCase): def test_cast(self): movie = TvShow() 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]) if __name__ == '__main__': diff --git a/tmdb/tmdb.py b/tmdb/tmdb.py index 4155874..a4a94d0 100644 --- a/tmdb/tmdb.py +++ b/tmdb/tmdb.py @@ -206,5 +206,7 @@ class TmdbBot(Plugin): await self.send_notice(evt, 'Syntax wrong: !tmdb id {movie|tvshow} {tmdb id}') else: await self.send_notice(evt, 'Syntax wrong: !tmdb id {movie|tvshow} {tmdb id}') + else: + await self.send_help(evt) else: - await self.send_notice(evt, 'Command unknown!') \ No newline at end of file + await self.send_help(evt) \ No newline at end of file