def command_listops_normal(self, bot: Bot, update: Update): opportunities = Opportunity.in_future_or_today().get() if opportunities.count() == 0: text = "Es gibt aktuell keine eingetragenen Reisen." else: text = "marudor kommt an folgende Orte:" for op in opportunities: text += "\n\nAm %s nach <strong>%s</strong>" \ "\n<em>Bestellen</em>: /order_%u" % ( op.date.strftime("%d.%m.%Y"), op.city, op.id, ) update.message.reply_text(text, parse_mode=ParseMode.HTML)
def command_listops_marudor(self, bot: Bot, update: Update): opportunities = Opportunity.in_future_or_today().get() if opportunities.count() == 0: text = "Es gibt aktuell keine eingetragenen Reisen." else: text = "Welche Bestellungen möchtest du einsehen?" for op in opportunities: text += "\n\nAm %s nach <strong>%s</strong>" \ "\n<em>Zeige Bestellungen</em>: /showorders_%u" \ "\n<em>Lösche Reise</em>: /deleteop_%u" % ( op.date.strftime("%d.%m.%Y"), op.city, op.id, op.id ) update.message.reply_text(text, parse_mode=ParseMode.HTML)