Commit 7a2ce82b authored by nanahira's avatar nanahira

bump

parent 55cc6401
This diff is collapsed.
......@@ -44,11 +44,11 @@
"testEnvironment": "node"
},
"dependencies": {
"koishi-target-def": "^1.1.0",
"koishi-target-def": "^1.1.1",
"node-schedule": "^2.1.0"
},
"peerDependencies": {
"koishi": "^4.7.1",
"koishi": "^4.7.4",
"koishi-thirdeye": "^10.2.1"
},
"devDependencies": {
......
......@@ -22,13 +22,6 @@ export class BaseSchedulePlugin extends BasePlugin<SchedulePluginConfig> {
return '';
}
isOneBotBot(bot?: Bot) {
return (
bot &&
(bot.platform === 'onebot' || bot['parentBot']?.platform === 'onebot')
);
}
async processSend() {
let message: string;
this.logger.info(`Running schedule task...`);
......@@ -45,13 +38,9 @@ export class BaseSchedulePlugin extends BasePlugin<SchedulePluginConfig> {
await Promise.all(
this.config.targets.map(async (target) => {
try {
let targetMessage = message;
const bot = this.bots.get(target.bot);
if (this.isOneBotBot(bot)) {
targetMessage = message.replace(/,url=base64/g, ',file=base64');
}
this.logger.debug(`Sending message from ${target.bot}.`);
const ids = await target.send(this.bots, targetMessage);
const ids = await target.send(this.bots, message);
this.logger.debug(
`Message sent from ${target.bot}: ${ids?.join(',')}`,
);
......
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