Commit dc3ae4f0 authored by nanahira's avatar nanahira

migrate koishi v4.8

parent 6d39a8ca
......@@ -61,12 +61,10 @@ export class SendTarget {
})
channels?: ChannelTarget[];
getBot(bots: Adapter.BotList) {
if (this.bot) {
return bots.get(this.bot);
} else {
return bots.find((bot) => !bot['parentBot']);
}
getBot(bots: Bot[]) {
return bots.find((bot) =>
this.bot ? bot.sid === this.bot : !bot['parentBot'],
);
}
private isOneBotBot(bot?: Bot) {
......@@ -97,7 +95,7 @@ export class SendTarget {
return ctx.intersect(this.getFilter());
}
async send(bots: Adapter.BotList, content: string) {
async send(bots: Bot[], content: string) {
const bot = this.getBot(bots);
if (!bot) {
throw new Error(`bot ${this.bot} not found`);
......
This diff is collapsed.
......@@ -54,11 +54,12 @@
"typescript": "^4.6.2"
},
"peerDependencies": {
"koishi": "^4.7.4",
"koishi": "^4.8.1",
"schemastery": "^3.4.3",
"schemastery-gen": "^3.1.6"
"schemastery-gen": "^3.1.14"
},
"dependencies": {
"koishi-thirdeye": "^11.0.5",
"lodash": "^4.17.21"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment