mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-28 16:24:51 +08:00
📝 空字符串
This commit is contained in:
parent
d6341c88cd
commit
657e7e52ac
@ -85,8 +85,9 @@ async def _(event: T_MessageEvent, bot: Bot, state: T_State, matcher: Matcher):
|
|||||||
reply = reply.replace("。", "||").replace(",", "||").replace("!", "||").replace("?", "||")
|
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)
|
if r: # 防止空字符串
|
||||||
await matcher.send(r)
|
await asyncio.sleep(random.random() * 2)
|
||||||
|
await matcher.send(r)
|
||||||
else:
|
else:
|
||||||
await asyncio.sleep(random.random() * 3)
|
await asyncio.sleep(random.random() * 3)
|
||||||
await matcher.send(reply)
|
await matcher.send(reply)
|
||||||
|
Loading…
Reference in New Issue
Block a user