Skip to content

Commit

Permalink
fix(thesaurus): ingore empty seg
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Feb 1, 2025
1 parent b4eb61e commit 24955dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/thesaurus/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ func randreply(m map[string][]string) zero.Handler {
text = strings.ReplaceAll(text, "{me}", nick)
id := ctx.Event.MessageID
for _, t := range strings.Split(text, "{segment}") {
if t == "" {
continue
}
process.SleepAbout1sTo2s()
id = ctx.SendChain(message.Reply(id), message.Text(t))
}
Expand Down

0 comments on commit 24955dc

Please sign in to comment.