feat: rkey标准化&rkey server增强&简化rkey端部署

This commit is contained in:
手瓜一十雪 committed 2025-04-10 18:54:18 +08:00
1 parent d4b8bc5d05
commit d4b6066f77
6 files changed
+77 -5

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import { ActionName } from '@/onebot/action/router';
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
export class GetRkeyEx extends GetPacketStatusDepends<void, unknown> {
override actionName = ActionName.GetRkeyEx;
async _handle() {
let rkeys = await this.core.apis.PacketApi.pkt.operation.FetchRkey();
return rkeys.map(rkey => {
return {
type: rkey.type === 10 ? "private" : "group",
rkey: rkey.rkey,
created_at: rkey.time,
ttl: rkey.ttl,
};
});
}
}