-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Koishi 4.12 Iteration Plan #1000
Labels
plan
future works
Comments
目前session user相关id有点多,我一开始以为uid指的是主键id,但是后来发现uid指的是拿到的却是sandbox+sandbox.value,userId拿到的是sandbox.value,id拿到的是主键id。而且session.getUser()中使用的参数是sandbox.value,而不是主键id。这块东西后面也会一并处理吗? |
Koishi 各种 ID 的用法介绍首先我们区分一下两个基础概念:
然后下面是会话对象上的各种 ID:
如何请求用户数据请求平台用户的数据: ctx.database.getUser(platform, userId, fields) 请求 Koishi 用户的数据: ctx.database.get('user', id, fields) 上面两种写法不能混用。 沙盒中的用户沙盒被视为一个特殊的聊天平台,平台名为 |
目前代码里面getUser()没有要填写platform吧? getUser<K extends User.Field = never>(id?: string, fields?: K[]): Promise<User>; |
抱歉看错了,我用的是session.getUser() |
|
This was referenced Mar 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
数据库更新
加载机制更新
Backlog
The text was updated successfully, but these errors were encountered: