mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-14 14:57:25 +08:00
🐛 智障回复分词bug
This commit is contained in:
parent
3b29b67c0b
commit
bdb1191f9e
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user