From 10d7a430a83906813b01b48d7eb57d5b6745ac5a Mon Sep 17 00:00:00 2001 From: Rafael Vargas Date: Tue, 28 Dec 2021 19:59:59 -0400 Subject: [PATCH] Do not accept phrases from api that doesn't have an author name --- vulkanbot/commands/Phrases.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vulkanbot/commands/Phrases.py b/vulkanbot/commands/Phrases.py index fef82f6..4b22281 100644 --- a/vulkanbot/commands/Phrases.py +++ b/vulkanbot/commands/Phrases.py @@ -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