add roles
This commit is contained in:
@@ -10,4 +10,22 @@ export async function getRole(guildId) {
|
||||
console.log("缓存命中")
|
||||
return myCache.get("roleList")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function getGuild(name){
|
||||
let { data } = await client.meApi.meGuilds();
|
||||
|
||||
// return data.forEach((item)=>{
|
||||
// // return
|
||||
// if(item.name == name){
|
||||
// return item.id
|
||||
// }
|
||||
// })
|
||||
for(const i of data){
|
||||
if(i.name == name){
|
||||
return i.id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user