mirror of
https://github.com/fumiama/ReiBot.git
synced 2026-06-08 20:10:30 +08:00
fix: from.id
This commit is contained in:
3
rule.go
3
rule.go
@@ -2,6 +2,7 @@ package rei
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unsafe"
|
||||
@@ -23,7 +24,7 @@ func newctrl(service string, o *ctrl.Options[*Ctx]) Rule {
|
||||
if !ctx.Message.Chat.IsPrivate() {
|
||||
gid = ctx.Message.Chat.ID
|
||||
}
|
||||
return c.Handler(uintptr(unsafe.Pointer(ctx)), gid, ctx.Message.From.ID)
|
||||
return c.Handler(uintptr(unsafe.Pointer(ctx)), gid, reflect.ValueOf(ctx.Value).FieldByName("From").FieldByName("ID").Int())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user