diff --git a/i18n/English.yml b/i18n/English.yml index 22e927b..c551c2d 100644 --- a/i18n/English.yml +++ b/i18n/English.yml @@ -16,6 +16,17 @@ text: "3000": "3000 Stickers.... \n You should really stop." misc: + private_access: | + *Hello there! 😊* + + Sadly, this instance of StickerFinder is private and you aren't authorized to interact with it. 😓 + + ⭐️ You may still use it's *search functionality* ⭐️\ + Just start by typing `@%{username}`. + + However, this project is open-source! + Check out the [Github repository](https://github.com/nukesor/sticker-finder) for the code and latest database dump in case you want to host your own bot. + error: | An unknown error occurred. I probably just got a notification about this and I'll try to fix it as quickly as possible. In case this error still occurs in a day or two, please report the bug to me :). The link to the Github repository is in the /help text. diff --git a/stickerfinder/session.py b/stickerfinder/session.py index 2ea8972..6a8dc0f 100644 --- a/stickerfinder/session.py +++ b/stickerfinder/session.py @@ -134,9 +134,13 @@ def wrapper(update, context): user = get_user(session, update) if config["mode"]["authorized_only"] and not user.authorized: - text = "StickerFinder is officially offline. Access will still be granted for [Patreons](https://www.patreon.com/nukesor).\n" - text += "Check the repository for the latest database dump in case you want to host your own bot." - message.chat.send_message(text, parse_mode="Markdown") + text = i18n.t( + "text.misc.private_access", + username=config["telegram"]["bot_name"], + ) + message.chat.send_message( + text, parse_mode="Markdown", disable_web_page_preview=True, + ) session.commit() return if not is_allowed(user, update, admin_only=admin_only):