We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10d43f2 commit fe25bbfCopy full SHA for fe25bbf
1 file changed
docs/start/coding.md
@@ -64,15 +64,15 @@ func main() {
64
Url: "localhost:4000",
65
})
66
bot := nsx.Default(driver)
67
- pvt := nsx.OnEvent[types.EventPvtMsg](bot)
+ pvt := nsx.OnEvent[event.PrivateMessage](bot)
68
69
adminuin, _ := strconv.ParseInt(os.Getenv("ADMIN_UIN"), 10, 64)
70
baseUrl := os.Getenv("NEWAPI_BASEURL")
71
key := os.Getenv("NEWAPI_KEY")
72
73
client := openai.NewClient(option.WithAPIKey(key), option.WithBaseURL(baseUrl))
74
75
- pvt.Handle(func(ctx *nsx.Context[types.EventPvtMsg]) {
+ pvt.Handle(func(ctx *nsx.Context[event.PrivateMessage]) {
76
msg := ctx.Msg
77
text, err := msg.TextFirst()
78
if err != nil {
0 commit comments