🐛 智障回复分词bug

This commit is contained in:
远野千束 2024-06-02 02:32:54 +08:00
parent 3b29b67c0b
commit bdb1191f9e

View File

@ -81,8 +81,8 @@ async def _(event: T_MessageEvent, bot: Bot, state: T_State, matcher: Matcher):
if random.random() < p: if random.random() < p:
if reply := get_reply(kws): if reply := get_reply(kws):
reply = reply.replace("", "||").replace("", "||").replace("", "||").replace("", "||")
if random.random() < cut_probability: if random.random() < cut_probability:
reply = reply.replace("", "||").replace("", "||").replace("", "||").replace("", "||")
replies = reply.split("||") replies = reply.split("||")
for r in replies: for r in replies:
await asyncio.sleep(random.random() * 2) await asyncio.sleep(random.random() * 2)