Browse Source

improve alert messages for tale upvoting

bluehood 7 years ago
parent
commit
2af8cb19b3
1 changed files with 3 additions and 4 deletions
  1. 3 4
      tale_handler.py

+ 3 - 4
tale_handler.py

@@ -75,18 +75,17 @@ class TaleHandler:
             # authors cannot upvote their own story
             bot.answer_callback_query(
                 callback_query_id=query.id,
-                text=voter.first_name + ' '
-                    'tried to upvote their own tale...classic')
+                text="Nope, can't upvote your own tale")
         elif voter.id in t.upvoters_id:
             bot.answer_callback_query(
                 callback_query_id=query.id,
-                text=voter.first_name + ' upvoted...again')
+                text='One upvote per person, sorry')
         else:
             t.upvoters_id.append(voter.id)
             t.upvotes += 1
             bot.answer_callback_query(
                 callback_query_id=query.id,
-                text=voter.first_name + ' upvoted the tale')
+                text='Upvote registered')
             if t.upvotes == 3:
                 n_tale = self.db.incr('n_tales')
                 self.db.hset(str(n_tale), 'author', t.author.first_name)