mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-10 22:19:06 +08:00
19 lines
566 B
TypeScript
19 lines
566 B
TypeScript
import { ActionName } from '@/napcat-onebot/action/router';
|
|
import { GetPacketStatusDepends } from '@/napcat-onebot/action/packet/GetPacketStatus';
|
|
|
|
export class GetRkeyEx extends GetPacketStatusDepends<void, unknown> {
|
|
override actionName = ActionName.GetRkeyEx;
|
|
|
|
async _handle () {
|
|
const 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,
|
|
};
|
|
});
|
|
}
|
|
}
|