replaced string replace with format string
Signed-off-by: klux2 <k.lux.gm@gmail.com>
This commit is contained in:
parent
d54be95d88
commit
8e04e905e6
1 changed files with 1 additions and 2 deletions
|
@ -114,9 +114,8 @@ class HSMensaW(telepot.aio.helper.ChatHandler):
|
|||
|
||||
async def send_essen(chat_id):
|
||||
global datum, essen
|
||||
nachricht = "Speiseplan am WOCHENTAG, den %s:\n" % datum.strftime("%d. MONAT %Y")
|
||||
nachricht = "Speiseplan am %s, den %s:\n" % (wochentage[datum.weekday()], datum.strftime("%d. MONAT %Y"))
|
||||
nachricht = nachricht.replace("MONAT", monate[(datum.month - 1) % 12])
|
||||
nachricht = nachricht.replace("WOCHENTAG", wochentage[datum.weekday()])
|
||||
for i in essen:
|
||||
nachricht += "- " + str(i).replace(".", ",") + "\n\n"
|
||||
await bot.sendMessage(chat_id, nachricht, "markdown")
|
||||
|
|
Loading…
Reference in a new issue