适用于HoshinoBot下的人生重来模拟器插件

Overview

LifeRestart for HoshinoBot

原作地址

python版原地址

本项目地址

安装方法

这是一个HoshinoBot的人生重来模拟器插件

这个项目使用的HoshinoBot的消息触发器,如果你了解其他机器人框架的api(比如nonebot)可以只修改消息触发器就将本项目移植到其他框架

下面介绍HoshinoBot的安装方法

在 HoshinoBot\hoshino\modules 目录下使用以下命令拉取本项目

git clone https://github.com/Daishengsheng/lifeRestart_bot.git

然后使用如下命令安装依赖

pip install -r requirements.txt

然后在 HoshinoBot\hoshino\config\_bot_.py 文件的 MODULES_ON 加入 lifeRestart_bot

重启 HoshinoBot

指令

命令 说明
/remake 或 人生重来 触发指令 /remake

效果演示

效果演示

You might also like...
Comments
  • handle message failed

    handle message failed

    ERROR: <ActionFailed, retcode=103> Traceback (most recent call last): File "/home/plugins/hoshinobot/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message await sf.func(bot, event) File "/home/plugins/hoshinobot/HoshinoBot/hoshino/service.py", line 217, in wrapper return await func(bot, event) File "/home/plugins/hoshinobot/HoshinoBot/hoshino/modules/lifeRestart_bot/init.py", line 91, in remake await bot.send_group_forward_msg(group_id=ev['group_id'], messages=mes_list) File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/init.py", line 223, in call_action return await self._api.call_action(action=action, **params) File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 186, in call_action result = await self._wsr_api.call_action(action, **params) File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 161, in call_action return _handle_api_result( File "/usr/local/lib/python3.8/dist-packages/aiocqhttp/api_impl.py", line 51, in _handle_api_result raise ActionFailed(retcode=result.get('retcode'))

    依赖已经安装了,请问是什么问题呀

    opened by Jiangluyu 2
  • __init__.py line 45 应该是 ‘/data’

    __init__.py line 45 应该是 ‘/data’

    会导致无法正常使用 [2021-09-07 05:09:36,978 人生重来模拟器〕 ERROR: sClass IFileNotFoundError'> occured when remake handling messag e 339. [2021-09-07 05:09:36,979 人生重来模拟器〕 ERROR: TErrno 2] No such file or directory: '/root/HoshinoBot/hoshino/ modules/lifeRestart_bot\\data/talents.json' Traceback (most recent call last) : File "/root/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message await sf. func (bot, event) File "/root/HoshinoBot/hoshino/service.py", line 218, in wrapper return await func (bot, event) File "/root/HoshinoBot/hoshino/modules/lifeRestart_bot/__init__.py",line45,in remake Life.load (FILE_PATH+'\ data') File "/root/HoshinoBot/hoshino/modules/lifeRestart_bot/Life.py", line 20, in load with open(os.path. join(datapath, "talents.json'), encoding='utf8') as fp: FileNotFoundError: [Errno 2] No such file or directory: /root/HoshinoBot/hoshino/modules/lifeRestart_bot\\data /talents.json'

    opened by Odeioikr 1
Owner
黛笙笙
黛笙笙