fix nickname

This commit is contained in:
HibiKier 2022-06-18 14:57:54 +08:00
parent da67f1f6f8
commit c37901290a
2 changed files with 4 additions and 2 deletions

View File

@ -246,6 +246,7 @@ __Docker 最新版本由 [Sakuracio](https://github.com/Sakuracio) 提供__
### 2022/6/18
* 修复webui中plugins2setting修改时会改变plugins2setting.cmd为字符串
* 修复昵称系统`BLACK_WORD`为空时造成报错
* 优化webUI当有插件出错时不会影响其他插件显示
* 优化browser

View File

@ -63,8 +63,9 @@ async def _(bot: Bot, event: MessageEvent, arg: Message = CommandArg()):
await nickname.finish("笨蛋!休想占用我的名字!#", at_sender=True)
_tmp = ""
black_word = Config.get_config("nickname", "BLACK_WORD")
for x in msg:
_tmp += "*" if x in black_word else x
if black_word:
for x in msg:
_tmp += "*" if x in black_word else x
msg = _tmp
if isinstance(event, GroupMessageEvent):
if await GroupInfoUser.set_group_member_nickname(