Skip to content

Commit 43b5ddd

Browse files
committed
🐛 替换关键字
1 parent 60f4e4a commit 43b5ddd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugin/antiabuse/anti.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
const (
2121
bandur time.Duration = time.Minute * 2
2222
add = "添加违禁词"
23-
delete = "删除违禁词"
23+
del = "删除违禁词"
2424
list = "查看违禁词"
2525
)
2626

@@ -62,7 +62,7 @@ func init() {
6262
})
6363

6464
notAntiabuse := func(ctx *zero.Ctx) bool {
65-
if zero.PrefixRule(add)(ctx) || zero.PrefixRule(delete)(ctx) || zero.PrefixRule(list)(ctx) {
65+
if zero.PrefixRule(add)(ctx) || zero.PrefixRule(del)(ctx) || zero.PrefixRule(list)(ctx) {
6666
return false
6767
}
6868
return true
@@ -112,7 +112,7 @@ func init() {
112112
}
113113
})
114114

115-
engine.OnPrefix(delete, zero.OnlyGroup, zero.AdminPermission, onceRule).SetBlock(true).Handle(
115+
engine.OnPrefix(del, zero.OnlyGroup, zero.AdminPermission, onceRule).SetBlock(true).Handle(
116116
func(ctx *zero.Ctx) {
117117
args := strings.TrimSpace(ctx.State["args"].(string))
118118
if err := db.deleteWord(ctx.Event.GroupID, args); err != nil {

0 commit comments

Comments
 (0)