Commit Graph

6 Commits

Author SHA1 Message Date
ikun两年半
3b295938e0 更新 bot.py
修改彩蛋权重喵~主打一个众生平等喵
2025-08-19 11:59:15 +08:00
雅诺狐
723a9d0098 Add weighted_choice utility and improve easter_egg randomness
Introduced a weighted_choice function for weighted random selection. Refactored the easter_egg function to use weighted_choice for more flexible and controlled message selection, replacing the previous randint-based logic.
2025-08-19 11:53:01 +08:00
minecraft1024a
5cce105acc feat(彩蛋): 增加彩蛋文本的随机性
在 `easter_egg` 函数中引入了随机数生成逻辑。
现在有20%的概率显示猫娘文本,80%的概率显示一个原有的文本,增加了趣味性。
2025-08-19 11:34:53 +08:00
ikun-11451
bfc131afdf 喵喵~ 2025-08-19 05:55:42 +08:00
minecraft1024a
cd3ccba8ad refactor(core): 调整数据库初始化时机
将数据库的初始化、表结构创建和自动迁移逻辑从配置文件加载时移动到主程序 `raw_main` 函数中。

这一改动旨在解决循环导入问题,并确保数据库在所有配置和核心模块加载完毕后才进行初始化,提高了程序的启动鲁棒性和模块独立性。
2025-08-17 15:59:56 +08:00
雅诺狐
2d4745cd58 初始化 2025-08-11 19:34:18 +08:00