MCPcopy Create free account
hub / github.com/FloatTech/ZeroBot-Plugin-Playground / main

Function main

main.go:215–226  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213 }
214}
215func main() {
216 if !strings.Contains(runtime.Version(), "go1.2") { // go1.20之前版本需要全局 seed,其他插件无需再 seed
217 rand.Seed(time.Now().UnixNano()) //nolint:staticcheck
218 }
219
220 zero.OnCommand("hello").
221 Handle(func(ctx *zero.Ctx) {
222 ctx.Send("world")
223 })
224
225 zero.RunAndBlock(&config.Z, process.GlobalInitMutex.Unlock)
226}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected