Skip to content

Commit 24955dc

Browse files
committed
fix(thesaurus): ingore empty seg
1 parent b4eb61e commit 24955dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugin/thesaurus/chat.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ func randreply(m map[string][]string) zero.Handler {
287287
text = strings.ReplaceAll(text, "{me}", nick)
288288
id := ctx.Event.MessageID
289289
for _, t := range strings.Split(text, "{segment}") {
290+
if t == "" {
291+
continue
292+
}
290293
process.SleepAbout1sTo2s()
291294
id = ctx.SendChain(message.Reply(id), message.Text(t))
292295
}

0 commit comments

Comments
 (0)