This should get us back on track (tested on ARCH Linux)

This commit is contained in:
Cedric
2023-07-27 18:07:02 +02:00
parent 5c158cf8a8
commit e4586a5834
23 changed files with 836 additions and 76 deletions
+3 -5
View File
@@ -33,8 +33,6 @@ class NewsController:
"Hei", "Salut", "Helló", "Halló", "Ciao", "Olá", "Ahoj", "¡Hola"]
layout = \
"""
<header>News</header>
<notice>CURRENT TIME</notice>
hh:mm - DD.MM.YYYY
{time}
@@ -173,9 +171,9 @@ hh:mm - DD.MM.YYYY
last_updated = f"[{self.util.time_to_readable(datetime.utcfromtimestamp(time.time()).timestamp() - last_updated)} ago]"
else:
last_updated = ""
blob = f"<yellow>{random.choice(self.greetings)} {sender.name} :: " \
f"{self.text.format_page('Your News', textwrap.dedent(news))} </yellow>{last_updated} " \
f"{f'<yellow>::</yellow> {name} running' if next_event.is_running() else ''}"
blob = ChatBlob('Your News', textwrap.dedent(news),
prefix=f"<yellow>{random.choice(self.greetings)} {sender.name} :: ",
suffix=f"</yellow> {last_updated} {f'<yellow>::</yellow> {name} running' if next_event.is_running() else ''}")
self.bot.send_mass_message(sender.char_id, blob)
if self.preview_recent().get_value() and auto:
entry = self.get_newest_entry()