From 6444bc0d3e32b04d575751684c44d66bd7145a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E6=A2=93=E6=9F=92?= <1787882683@qq.com> Date: Mon, 1 Dec 2025 20:10:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=BC=80=E6=BA=90?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/bot.py b/bot.py index 34dbbda4..0cc46f86 100644 --- a/bot.py +++ b/bot.py @@ -127,6 +127,33 @@ app = None loop = None +def print_opensource_notice(): + """打印开源项目提示,防止倒卖""" + from colorama import init, Fore, Style + + init() + + notice_lines = [ + "", + f"{Fore.CYAN}{'═' * 70}{Style.RESET_ALL}", + f"{Fore.GREEN} ★ MaiBot - 开源 AI 聊天机器人 ★{Style.RESET_ALL}", + f"{Fore.CYAN}{'─' * 70}{Style.RESET_ALL}", + f"{Fore.YELLOW} 本项目是完全免费的开源软件,基于 GPL-3.0 协议发布{Style.RESET_ALL}", + f"{Fore.WHITE} 如果有人向你「出售本软件」,你被骗了!{Style.RESET_ALL}", + "", + f"{Fore.WHITE} 官方仓库: {Fore.BLUE}https://github.com/MaiM-with-u/MaiBot {Style.RESET_ALL}", + f"{Fore.WHITE} 官方文档: {Fore.BLUE}https://docs.mai-mai.org {Style.RESET_ALL}", + f"{Fore.WHITE} 官方群聊: {Fore.BLUE}766798517{Style.RESET_ALL}", + f"{Fore.CYAN}{'─' * 70}{Style.RESET_ALL}", + f"{Fore.RED} ⚠ 将本软件作为「商品」倒卖、隐瞒开源性质均违反协议!{Style.RESET_ALL}", + f"{Fore.CYAN}{'═' * 70}{Style.RESET_ALL}", + "", + ] + + for line in notice_lines: + print(line) + + def easter_egg(): # 彩蛋 from colorama import init, Fore @@ -272,6 +299,9 @@ def raw_main(): if platform.system().lower() != "windows": time.tzset() # type: ignore + # 打印开源提示(防止倒卖) + print_opensource_notice() + check_eula() logger.info("检查EULA和隐私条款完成")