HornCopper / Inkar-Suki

聊天Bot · 基于Nonebot2 · Onebot v11 · 欢迎使用
https://inkar-suki.codethink.cn
GNU Affero General Public License v3.0
133 stars 60 forks source link

机器人初次入群的bug #810

Closed root13920 closed 3 months ago

root13920 commented 3 months ago

Bug report(问题描述)

Steps to reproduce(问题复现步骤)

在自建机器人新拉入群聊时 由于src/data/中未生成该群的配置文件 会导致出现以下问题 image 查看代码发现是由于src/tools/basic/message_process.py文件中的getGroupData()函数 在处理群聊信息时会直接去访问src/data/群号/settings.json文件 由于在初次进群没有生成对应的文件 导致后续数据处理中返回了空值 image

导致在97行处获取不到subscribe参数出现报错 image

Screenshot or Gif(截图或动态图)

Other relevant information(格外信息)

HornCopper commented 3 months ago

尝试使用重置音卡?由于文件io性能开销过大我才移除的那一段代码,如有需要可以自行添加