From e0b521803790e18dee61d8bbcebeb17c14ffacee Mon Sep 17 00:00:00 2001 From: 3252a8 <3252a8@proton.me> Date: Sat, 16 May 2026 00:13:15 +0300 Subject: [PATCH] chore: print remnawave-minishop ascii banner on startup --- main.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/main.py b/main.py index e102253..1791056 100644 --- a/main.py +++ b/main.py @@ -9,6 +9,30 @@ from bot.main_bot import run_bot from config.settings import get_settings from db.database_setup import init_db, init_db_connection +_STARTUP_BANNER = r""" + ~ ~ ~ r e m n a w a v e ~ ~ ~ + + ███╗ ███╗██╗███╗ ██╗██╗███████╗██╗ ██╗ ██████╗ ██████╗ + ████╗ ████║██║████╗ ██║██║██╔════╝██║ ██║██╔═══██╗██╔══██╗ + ██╔████╔██║██║██╔██╗ ██║██║███████╗███████║██║ ██║██████╔╝ + ██║╚██╔╝██║██║██║╚██╗██║██║╚════██║██╔══██║██║ ██║██╔═══╝ + ██║ ╚═╝ ██║██║██║ ╚████║██║███████║██║ ██║╚██████╔╝██║ + ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ + + https://github.com/3252a8/remnawave-minishop +""" + + +def _print_startup_banner() -> None: + # Bypass the logging formatter so the ASCII art renders without per-line + # timestamp/level prefixes mangling the box characters. + try: + sys.stdout.write(_STARTUP_BANNER + "\n") + sys.stdout.flush() + except Exception: + # Banner is purely cosmetic; never fail startup over it. + pass + def _resolve_log_level(value: str) -> int: return getattr(logging, value.upper(), logging.INFO) @@ -28,6 +52,7 @@ async def main(): if __name__ == "__main__": + _print_startup_banner() load_dotenv() logging.basicConfig( level=_resolve_log_level(os.getenv("LOG_LEVEL", "INFO")),