Do not accept phrases from api that doesn't have an author name

This commit is contained in:
Rafael Vargas
2021-12-28 19:59:59 -04:00
parent 23c8d99d33
commit 10d7a430a8

View File

@@ -51,6 +51,9 @@ class Phrases(commands.Cog):
phrase = data['quoteText']
author = data['quoteAuthor']
if phrase == '' or author == '': # Don't accept incomplete phrases
continue
text = f'{phrase} \nBy: {author}'
return text