Skip to content

Commit

Permalink
deprecate the bot
Browse files Browse the repository at this point in the history
  • Loading branch information
ekeih committed Nov 16, 2024
1 parent ff24438 commit 4fbf29a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions frontend/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
MessageHandler, filters)

from frontend.schedule import schedule
from frontend.strings import about_text, help_text
from frontend.strings import about_text, goodbye, help_text

logging.getLogger('JobQueue').setLevel(logging.INFO)
logging.getLogger('telegram').setLevel(logging.INFO)
Expand Down Expand Up @@ -166,6 +166,7 @@ async def menu(update: Update, context: CallbackContext) -> None:
reply = possible_canteens.pop()[1]
await update.message.reply_text(text=reply, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
message_logger.debug('Out: %s' % reply)
await update.message.reply_text(text=goodbye, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
elif len(possible_canteens) > 1:
reply = 'Meintest du vielleicht:\n'
for canteen in possible_canteens:
Expand All @@ -176,14 +177,13 @@ async def menu(update: Update, context: CallbackContext) -> None:
error_message = "\n*Chat*\n```\n%s\n```\n*Message*\n```\n%s\n```\n*User*\n```\n%s\n```" % \
(update.effective_chat, update.effective_message, update.effective_user)
await send_message_to_admin(context.bot, error_message)
reply = 'Leider kenne ich keinen passenden Speiseplan. ' \
'Wenn das ein Fehler ist, wende dich an @ekeih.'
reply = 'Leider kenne ich keinen passenden Speiseplan.'
await update.message.reply_text(text=reply, parse_mode=ParseMode.MARKDOWN)
message_logger.debug('Out: %s' % reply)
else:
await update.message.reply_text(text=reply, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
message_logger.debug('Out: %s' % reply)
await update.message.reply_text(text="Der Betrieb des OmNomNom Bots wird demnächst eingestellt. Falls du den Bot selber betreiben möchtest, findest du den Source Code unter https://github.com/ekeih/OmNomNom. Vielen Dank an alle, die den Bot in den letzten fast 10 Jahren genutzt haben oder sogar zum Code beigetragen haben!", parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
await update.message.reply_text(text=goodbye, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
else:
reply = 'Sorry, leider habe ich das Datum nicht verstanden. Probier es doch einmal mit `/%s morgen`, ' \
'`/%s dienstag`, `/%s yesterday` oder `/%s next friday`.' % (requested_canteen, requested_canteen,
Expand Down
10 changes: 7 additions & 3 deletions frontend/strings.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import emoji
from canteens.canteen import FISH, MEAT, VEGAN, VEGGIE

goodbye = """
Der Betrieb des OmNomNom Bots wird demnächst eingestellt. Falls du den Bot selber betreiben möchtest, findest du den Source Code unter https://github.com/ekeih/OmNomNom.
Vielen Dank an alle, die den Bot in den letzten fast 10 Jahren genutzt haben oder sogar zum Code beigetragen haben!
"""

about_text = """*OmNomNom*
OmNomNom is a Telegram bot to get canteen information. Currently it supports only canteens in Berlin (Germany) \
and most of its answers are in German.
The bot is available as [@OmnBot](https://telegram.me/OmnBot). Feel free to talk to it and invite it to your groups.
Find out more about it on [Github](https://github.com/ekeih/OmNomNom). Pull requests and issues are always welcome. If \
you have questions you can talk to me via [Telegram](https://telegram.me/ekeih).
Find out more about it on [Github](https://github.com/ekeih/OmNomNom).
OmNomNom is licensed under the [GNU AGPL v3](https://github.com/ekeih/OmNomNom#license).
"""
Expand Down Expand Up @@ -47,7 +52,6 @@
%s = Fisch
Viel Spaß und guten Appetit! %s
Bei Problemen sprich einfach @ekeih an.
PPS: Der Bot ist OpenSource (GNU AGPL v3) und den Code findest du auf [GitHub](https://github.com/ekeih/OmNomNom). %s
""" % (VEGAN, VEGGIE, MEAT, FISH, emoji.emojize(':cake:', language='alias'),
Expand Down

0 comments on commit 4fbf29a

Please sign in to comment.