mirror of
				https://gitlab.com/questable/questable_bot
				synced 2025-10-31 04:10:06 +01:00 
			
		
		
		
	Show priority in list quests/side quests
This commit is contained in:
		
							
								
								
									
										10
									
								
								bot.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								bot.py
									
									
									
									
									
								
							| @@ -194,13 +194,17 @@ def list_quests(bot, update, player, type): | |||||||
|     else: |     else: | ||||||
|         text = ("<b>" + {"quest": "📖", "side_quest": "📒"}[type] + |         text = ("<b>" + {"quest": "📖", "side_quest": "📒"}[type] + | ||||||
|                 " List of " + {"quest": "Quests", "side_quest": |                 " List of " + {"quest": "Quests", "side_quest": | ||||||
|                                "Side Quests"}[type] + "</b>\n") |                                "Side Quests"}[type] + "</b>") | ||||||
|     x.sort(key=lambda i: (i.imp, -i.QID), reverse=True) |     x.sort(key=lambda i: (i.imp, -i.QID), reverse=True) | ||||||
|     if type == "quest": |     imp = 3 | ||||||
|     for i in x: |     for i in x: | ||||||
|  |         if i.imp <= imp: | ||||||
|  |             text += "\n\n<b>📌 " + ["Low", "Medium", "High"][i.imp-1] | ||||||
|  |             text += "</b>" | ||||||
|  |             imp = i.imp - 1 | ||||||
|  |         if type == "quest": | ||||||
|             text += f"\n/Q_{i.QID} {i.name}" |             text += f"\n/Q_{i.QID} {i.name}" | ||||||
|         else: |         else: | ||||||
|         for i in x: |  | ||||||
|             text += f"\n/SQ_{i.QID} {i.name}" |             text += f"\n/SQ_{i.QID} {i.name}" | ||||||
|  |  | ||||||
|     chat_id = update.message.chat_id |     chat_id = update.message.chat_id | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user