add 活跃统计
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { myCache } from "../cache/index.js";
|
||||
import { client } from "./base.js";
|
||||
|
||||
export async function getRole(guildId){
|
||||
let { data } = await client.roleApi.roles(guildId);
|
||||
return data
|
||||
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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user