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

chore: make lint happy

This commit is contained in:
源文雨
2025-05-13 20:36:04 +09:00
parent 617956e3e2
commit 252105a8d9
2 changed files with 6 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ func main() {
}, },
Debug: true, Debug: true,
Handler: &rei.Handler{ Handler: &rei.Handler{
OnMessage: func(updateid int, bot *rei.TelegramClient, msg *tgba.Message) { OnMessage: func(_ int, bot *rei.TelegramClient, msg *tgba.Message) {
if len(msg.Text) <= len("测试") { if len(msg.Text) <= len("测试") {
return return
} }
@@ -31,7 +31,7 @@ func main() {
log.Errorln(err) log.Errorln(err)
} }
}, },
OnEditedMessage: func(updateid int, bot *rei.TelegramClient, msg *tgba.Message) { OnEditedMessage: func(_ int, bot *rei.TelegramClient, msg *tgba.Message) {
if len(msg.Text) <= len("测试") { if len(msg.Text) <= len("测试") {
return return
} }

View File

@@ -9,19 +9,19 @@ type FutureEvent struct {
} }
// NewFutureEvent 创建一个FutureEvent, 并返回其指针 // NewFutureEvent 创建一个FutureEvent, 并返回其指针
func NewFutureEvent(typ string, Priority int, Block bool, rule ...Rule) *FutureEvent { func NewFutureEvent(typ string, prio int, Block bool, rule ...Rule) *FutureEvent {
return &FutureEvent{ return &FutureEvent{
Type: typ, Type: typ,
Priority: Priority, Priority: prio,
Rule: rule, Rule: rule,
Block: Block, Block: Block,
} }
} }
// FutureEvent 返回一个 FutureEvent 实例指针,用于获取满足 Rule 的 未来事件 // FutureEvent 返回一个 FutureEvent 实例指针,用于获取满足 Rule 的 未来事件
func (m *Matcher) FutureEvent(Type string, rule ...Rule) *FutureEvent { func (m *Matcher) FutureEvent(typ string, rule ...Rule) *FutureEvent {
return &FutureEvent{ return &FutureEvent{
Type: Type, Type: typ,
Priority: m.priority, Priority: m.priority,
Block: m.Block, Block: m.Block,
Rule: rule, Rule: rule,