Skip to content

Commit d2d2f3e

Browse files
committed
docs: 更新聊天机器人项目文档
1 parent fe25bbf commit d2d2f3e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/start/coding.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ func main() {
4141
Url: "localhost:4000",
4242
})
4343
bot := nsx.Default(driver)
44-
pvt := nsx.OnEvent[types.EventPvtMsg](bot)
44+
pvt := nsx.OnEvent[event.PrivateMessage](bot)
4545

4646
adminuin, _ := strconv.ParseInt(os.Getenv("ADMIN_UIN"), 10, 64)
47-
pvt.Handle(func(ctx *nsx.Context[types.EventPvtMsg]) {
47+
pvt.Handle(func(ctx *nsx.Context[event.PrivateMessage]) {
4848
ctx.Msg.Reply(ctx, "测试")
4949
}, filter.OnlyUsers(adminuin))
5050

0 commit comments

Comments
 (0)