Browse Source

only quote messages when necessary

bluehood 7 years ago
parent
commit
2f1e40b1b2
2 changed files with 8 additions and 7 deletions
  1. 5 3
      handlers.py
  2. 3 4
      tale_handler.py

+ 5 - 3
handlers.py

@@ -32,13 +32,15 @@ def is_web_up(bot, update):
 def vietnam(bot, update):
     """Spout wise words"""
     update.message.reply_text(text='Ricordate, ragazzi, LCM è come il Vietnam.'
-                              'Una volta entrati, è impossibile uscirne!')
+                              'Una volta entrati, è impossibile uscirne!',
+                              quote=False)
 
 
 def sell_your_mother(bot, update):
     """Remind people not to disclose passwords"""
     pic_id = 'AgADBAADbasxG9JPlAQNlEW3ML5sk_bEXxkABHKAFZ1ZzBZsNvMBAAEC'
-    update.message.reply_photo(photo=pic_id, caption='cit. Mandelli')
+    update.message.reply_photo(photo=pic_id, caption='cit. Mandelli',
+                               quote=False)
 
 
 def print_msg_info(bot, update):
@@ -56,4 +58,4 @@ def error(bot, update, error):
 def abuse_150(bot, update):
     """Verbally abuse incompetent LCM collaborators"""
     insult = np.random.choice(insults)
-    update.message.reply_text(text=insult)
+    update.message.reply_text(text=insult, quote=False)

+ 3 - 4
tale_handler.py

@@ -33,7 +33,6 @@ class TaleHandler:
         user = update.message.from_user
         prompt_msg = update.message.reply_text(
             text='Ok, %s, tell me your story!' % user.first_name,
-            reply_to_message_id=update.message.message_id,
             reply_markup=ForceReply(selective=True))
         self.cur_authors.append((user.id, prompt_msg.message_id))
 
@@ -58,7 +57,6 @@ class TaleHandler:
         keyboard = InlineKeyboardMarkup([[b]])
         tale_msg.reply_text(
           text='Alright, I need three upvotes to add this tale to my database',
-          reply_to_message_id=tale_msg.message_id,
           reply_markup=keyboard)
 
     def save_tale(self, bot, update):
@@ -117,5 +115,6 @@ class TaleHandler:
         else:
             rnd_tale = str(np.random.randint(1, int(n_tales) + 1))
             t = self.db.hgetall(rnd_tale)
-            msg.reply_text(text="This one's from " + t['author'] + ":")
-            msg.reply_text(text=t['tale'])
+            msg.reply_text(text="This one's from " + t['author'] + ":",
+                           quote=False)
+            msg.reply_text(text=t['tale'], quote=False)