qqbot/bin/channel-core/tools.js
2022-06-03 21:57:28 +08:00

13 lines
367 B
JavaScript

import { myCache } from "../cache/index.js";
import { client } from "./base.js";
export async function getRole(guildId) {
if(!myCache.get("roleList")){
let { data } = await client.roleApi.roles(guildId);
myCache.set("roleList",data)
return data
}else{
console.log("缓存命中")
return myCache.get("roleList")
}
}