ChatLearning——让bot学会你的群聊
-
@CabbCat 有先打开mirai登录上qq吗,因为适配了聊天环境触发指令,需要先启动mirai
-
linux怎么后台运行呀,用
nohub python3.8 Chatmain.py &
会报错 -
@Wangs121 nohup python ./Chatmain.py &
-
@Wangs121 用screen也行
-
@daisy524 在 ChatLearning——让bot学会你的群聊 中说:
@Wangs121 nohup python ./Chatmain.py &
谢谢!
发现虽然会报错,但私聊指令依然能运行
nohub.out
中的内容如下Warning: Input is not a terminal (fd=0). 欢迎使用ChatLearning应用 版本号: 1.1.5 输入help来查看指令列表吧! Traceback (most recent call last): File "/usr/lib/python3.8/asyncio/selector_events.py", line 261, in _add_reader key = self._selector.get_key(fd) File "/usr/lib/python3.8/selectors.py", line 192, in get_key raise KeyError("{!r} is not registered".format(fileobj)) from None KeyError: '0 is not registered' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/input/vt100.py", line 173, in _attached_input loop.add_reader(fd, callback_wrapper) File "/usr/lib/python3.8/asyncio/selector_events.py", line 334, in add_reader return self._add_reader(fd, callback, *args) File "/usr/lib/python3.8/asyncio/selector_events.py", line 263, in _add_reader self._selector.register(fd, selectors.EVENT_READ, File "/usr/lib/python3.8/selectors.py", line 359, in register self._selector.register(key.fd, poller_events) PermissionError: [Errno 1] Operation not permitted During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./Chatmain.py", line 813, in <module> loop.run_until_complete(getcommand_tui()) File "/usr/local/lib/python3.8/dist-packages/nest_asyncio.py", line 81, in run_until_complete return f.result() File "/usr/lib/python3.8/asyncio/futures.py", line 178, in result raise self._exception File "/usr/lib/python3.8/asyncio/tasks.py", line 282, in __step result = coro.throw(exc) File "./Chatmain.py", line 730, in getcommand_tui command = await session.prompt_async('\nChatLearning ->') File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/shortcuts/prompt.py", line 1224, in prompt_async return await self.app.run_async(set_exception_handler=set_exception_handler) File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/application/application.py", line 856, in run_async return await _run_async2() File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/application/application.py", line 826, in _run_async2 result = await _run_async() File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/application/application.py", line 741, in _run_async with self.input.raw_mode(), self.input.attach( File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__ return next(self.gen) File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/input/vt100.py", line 182, in _attached_input raise EOFError EOFError
-
@Wangs121 前台报错是因为只于后台运行后,就没法从控制台接收指令
下次更新我修复一下 -
用pip install安装模块咋装啊会出现这个,百度不到解决方法
Looking in indexes: https://pypi.doubanio.com/simple
Requirement already satisfied: nest_asyncio in /usr/local/lib/python3.6/site-packages (1.5.4)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv -
@NANYUA 前面加个sudo试试
-
2022.2.26更新
新增- 特定词条过滤系统
- 敏感词过滤系统
- 黑名单系统
- 全新的管理模式,请见README
修复
- 修复了在Linux环境下使用后台运行指令前台报错的问题(大概)
优化
- 现在ChatLearning将不会记录@类,回复类,戳一戳类消息
更新注意
- Windows只需覆盖exe文件
- Linux则需覆盖所有py文件
- 更新后务必先使用blackfreq来设置黑名单容错次数
-
这绝对是最好用的插件,谢谢!大佬牛逼
-
@Koreyoshi 加了sudo 还是显示这个警告,没安装上模块
-
@NANYUA 你试试能不能使用,这个应该是装好了的
-
@冰丶凝梦 谢谢!
-
@NANYUA 模块是有的,是不是你在运行的时候Python版本指定错误了?看看环境变量,你得指定那个Python3.6的
-
我无论是在群里还是私聊发admin怎么都没反应呀,管理员QQ号也设置的了
-
@冰丶凝梦 私聊bot,前面指令前面加上感叹号
-
@冰丶凝梦 忘了在readme上写了,防止与其他插件冲突
-
@冰丶凝梦 控制台的任何指令都能私聊bot使用,前面都需要加上!
-
@Koreyoshi 原来如此,好了
-
@Koreyoshi 下载下来了,但是提示缺少这个组件