1
0
mirror of https://github.com/fumiama/ReiBot.git synced 2026-06-10 13:00:40 +08:00

feat: ctx add api Break

This commit is contained in:
源文雨
2022-10-11 00:14:05 +08:00
parent 95250c70dc
commit 73d5f1e597
5 changed files with 27 additions and 6 deletions

View File

@@ -148,3 +148,13 @@ func (ctx *Ctx) SendAudio(file tgba.RequestFileData, replytosender bool, caption
}
return ctx.Caller.Send(&msg)
}
// Block 匹配成功后阻止后续触发
func (ctx *Ctx) Block() {
ctx.ma.SetBlock(true)
}
// Block 在 pre, rules, mid 阶段阻止后续触发
func (ctx *Ctx) Break() {
ctx.ma.Break = true
}