This commit is contained in:
ikechan8370 2023-11-28 00:20:13 +08:00
parent 46d88c2669
commit 1c6c10b118
3 changed files with 75 additions and 68 deletions

15
utils/bot.js Normal file
View file

@ -0,0 +1,15 @@
export function getBots () {
if (Bot.uin === 88888) {
// 找适配器
let adapters = Bot.adapter
return adapters?.map(uin => Bot[uin])
} else if (Bot.adapter && Bot.adapter.length > 0) {
let bots = [Bot]
Bot.adapter.forEach(uin => {
bots.push(Bot[uin])
})
return bots
} else {
return [Bot]
}
}