diff --git a/README.md b/README.md index e69de29..3c29f79 100644 --- a/README.md +++ b/README.md @@ -0,0 +1 @@ +# 使用Go语言重新实现 [sihuan/XZZ](https://github.com/sihuan/XZZ) 机器人项目 diff --git a/test/test.go b/test/test.go new file mode 100644 index 0000000..56e5404 --- /dev/null +++ b/test/test.go @@ -0,0 +1 @@ +package test diff --git a/utils/router.go b/utils/router.go index a163a65..330f165 100644 --- a/utils/router.go +++ b/utils/router.go @@ -32,9 +32,10 @@ func Router(data map[string]interface{}) { message := worker.CheckPermission() if message != "0" { worker.SendMsg(message) - } else { - message = worker.GetMsg() - worker.SendMsg(message) - } + } //else { + + // message = worker.GetMsg() + // worker.SendMsg(message) + //} } diff --git a/workers/emm.go b/workers/emm.go index d8f4854..2cb4a33 100644 --- a/workers/emm.go +++ b/workers/emm.go @@ -1,17 +1,16 @@ package workers -import "fmt" - -type Emmm struct { +type Emm struct { *StdAns } -func (a *Emmm) GetMsg() string { - a.BlockGroup = []string{"874769998"} +func (a *Emm) GetMsg() string { + return "-1" + // a.BlockGroup = []string{"874769998"} - fmt.Println(a.CheckPermission()) - if a.CheckPermission() != "0" { - return a.CheckPermission() - } - return "咱也不知道" + a.Parms[0] + "是啥呢~" + // fmt.Println(a.CheckPermission()) + // if a.CheckPermission() != "0" { + // return a.CheckPermission() + // } + // return "咱也不知道" + a.Parms[0] + "是啥呢~" } diff --git a/workers/newworker.go b/workers/newworker.go index 297196e..5561673 100644 --- a/workers/newworker.go +++ b/workers/newworker.go @@ -15,7 +15,7 @@ func NewWorker(parms []string, uid, gid, role, mid, rawMsg string) Worker { StdAns: NewStdAns(parms, uid, gid, role, mid, rawMsg), } default: - return &Emmm{ + return &Emm{ StdAns: NewStdAns(parms, uid, gid, role, mid, rawMsg)} } }