foodforus: display errors

master
mutantmonkey 2013-04-11 18:03:41 -04:00
parent 02e45d1799
commit 29269c7c51
1 changed files with 4 additions and 1 deletions

View File

@ -70,6 +70,9 @@ def foodvote(phenny, input):
raise GrumbleError("Uh oh, I couldn't contact foodforus. HOW WILL WE "\
"EAT NOW‽")
if 'error' in data:
phenny.reply(data['error'])
else:
phenny.reply("Your vote has been recorded.")
foodvote.rule = (['foodvote'], r'(.*) (\d{2}:\d{2})( .*)?')