Improved command parser for wrong command syntax
This commit is contained in:
parent
fbaf6c6666
commit
03a63987ef
|
@ -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__':
|
||||||
|
|
|
@ -206,5 +206,7 @@ class TmdbBot(Plugin):
|
||||||
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, 'Syntax wrong: !tmdb id {movie|tvshow} {tmdb id}')
|
await self.send_notice(evt, 'Syntax wrong: !tmdb id {movie|tvshow} {tmdb id}')
|
||||||
|
else:
|
||||||
|
await self.send_help(evt)
|
||||||
else:
|
else:
|
||||||
await self.send_notice(evt, 'Command unknown!')
|
await self.send_help(evt)
|
Loading…
Reference in a new issue