Commit 7a2ce82b authored by nanahira's avatar nanahira

bump

parent 55cc6401
......@@ -9,7 +9,7 @@
"version": "1.1.2",
"license": "MIT",
"dependencies": {
"koishi-target-def": "^1.1.0",
"koishi-target-def": "^1.1.1",
"node-schedule": "^2.1.0"
},
"devDependencies": {
......@@ -37,7 +37,7 @@
"ws": "^8.6.0"
},
"peerDependencies": {
"koishi": "^4.7.1",
"koishi": "^4.7.4",
"koishi-thirdeye": "^10.2.1"
}
},
......@@ -1060,13 +1060,13 @@
}
},
"node_modules/@koishijs/core": {
"version": "4.7.1",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.7.1.tgz",
"integrity": "sha512-vSd2BgyhDrTW/C7Ju1wDr5Z3vp7Qdyk7LgSpGI/b3QtDEfEkhdYKQ9J9LdHIVdUOFL0L0WeRgImW4ZMBtdVlfg==",
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.7.4.tgz",
"integrity": "sha512-S4pPaO05WC0htkQVcTMTluBZv4g8sEEBJ2ItHN2zJA8syet3iKJidT+s2gYt8d2rBo0Ndlvo1gBLGLNl/Zc9yg==",
"peer": true,
"dependencies": {
"@koishijs/utils": "^5.4.5",
"cordis": "^1.1.1",
"cordis": "^1.3.3",
"fastest-levenshtein": "^1.0.12",
"minato": "^1.1.0"
},
......@@ -1131,15 +1131,6 @@
"koishi": "^4.7.0"
}
},
"node_modules/@koishijs/plugin-help": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-help/-/plugin-help-1.0.0.tgz",
"integrity": "sha512-SvOZiSmtysQxnhOUG0He+/Ftxr+IuIbTApsK6KypRpQ4a1q7OuJWmKb2e+f62zS3GhMYBJ8qT0wRMU+TFPP3AQ==",
"peer": true,
"peerDependencies": {
"koishi": "^4.7.1"
}
},
"node_modules/@koishijs/plugin-sandbox": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-sandbox/-/plugin-sandbox-1.1.3.tgz",
......@@ -1149,15 +1140,6 @@
"koishi": "^4.7.1"
}
},
"node_modules/@koishijs/plugin-suggest": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-suggest/-/plugin-suggest-1.0.0.tgz",
"integrity": "sha512-6jmhymcygID59Z3UblAARGXflJoH0+Tj/qi20GNQO0bxrKkoW4qjxJhlmZe2uv+D1hvTO0q2Yv98iEMDhKyXxw==",
"peer": true,
"peerDependencies": {
"koishi": "^4.7.1"
}
},
"node_modules/@koishijs/segment": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@koishijs/segment/-/segment-1.1.1.tgz",
......@@ -2693,9 +2675,9 @@
"peer": true
},
"node_modules/cordis": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/cordis/-/cordis-1.1.1.tgz",
"integrity": "sha512-l1tYxBqy+oEb3EKEvQAlH1g5BICDdnTdcIre1MuCY/qWO4bsrh97qd7jQe2Rq/+tg5HRqs7K6RgP5N/85c57xw==",
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/cordis/-/cordis-1.3.3.tgz",
"integrity": "sha512-mpyBWAEVYX8/YHoGWIqaOjrOk6DmtrOWZfsBSinNR+nDBlB39Ks6aC1B5oZ7AdnVoRE2ZYBCGecoHrlxcRxd6w==",
"peer": true,
"dependencies": {
"cosmokit": "^1.1.2"
......@@ -5317,15 +5299,13 @@
}
},
"node_modules/koishi": {
"version": "4.7.1",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.7.1.tgz",
"integrity": "sha512-WtY2ZujFMP4/ySKCc08oXLe2dYlZsdZP7f2eUck1w3cdvOh3eAgndckBP7xpkICAL0l6BYxrbzurIYh32Qck6g==",
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.7.4.tgz",
"integrity": "sha512-VVHf3TyFsTuKrB8IZffxwmwiGx+zyhDo+DNNEFQjvomgqFdGEceAnLxNIf10K48aB1CDmkmi37b6uaURi4Z1Hw==",
"peer": true,
"dependencies": {
"@koa/router": "^10.1.1",
"@koishijs/core": "^4.7.1",
"@koishijs/plugin-help": "^1.0.0",
"@koishijs/plugin-suggest": "^1.0.0",
"@koishijs/core": "^4.7.4",
"@koishijs/utils": "^5.4.5",
"@types/koa": "*",
"@types/koa__router": "*",
......@@ -5336,7 +5316,7 @@
"koa-bodyparser": "^4.3.0",
"ns-require": "^1.1.2",
"parseurl": "^1.3.3",
"path-to-regexp": "^6.2.0",
"path-to-regexp": "^6.2.1",
"portfinder": "^1.0.28",
"proxy-agent": "^5.0.0",
"ws": "^8.6.0"
......@@ -5363,14 +5343,14 @@
}
},
"node_modules/koishi-target-def": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/koishi-target-def/-/koishi-target-def-1.1.0.tgz",
"integrity": "sha512-y6BzP79CTixzXcPRLBJwO9r66j13ORkx8KJKWa6bBP1wUlXJFT0wfCSVKElbbr/I1/5SUd++qNVLHz5TmM/mQQ==",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/koishi-target-def/-/koishi-target-def-1.1.1.tgz",
"integrity": "sha512-OIWTCTCwX3HzUsyZ/j1lOvoLL3KyCL0jHhU9DcLkpKHiof1k1A0IMKAjndOoGKkzwRCGIDB31Y+aH1UQ0YKlTQ==",
"dependencies": {
"lodash": "^4.17.21"
},
"peerDependencies": {
"koishi": "^4.7.1",
"koishi": "^4.7.4",
"schemastery": "^3.4.3",
"schemastery-gen": "^3.1.6"
}
......@@ -6017,9 +5997,9 @@
"dev": true
},
"node_modules/path-to-regexp": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz",
"integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz",
"integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==",
"peer": true
},
"node_modules/path-type": {
......@@ -8757,13 +8737,13 @@
}
},
"@koishijs/core": {
"version": "4.7.1",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.7.1.tgz",
"integrity": "sha512-vSd2BgyhDrTW/C7Ju1wDr5Z3vp7Qdyk7LgSpGI/b3QtDEfEkhdYKQ9J9LdHIVdUOFL0L0WeRgImW4ZMBtdVlfg==",
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/@koishijs/core/-/core-4.7.4.tgz",
"integrity": "sha512-S4pPaO05WC0htkQVcTMTluBZv4g8sEEBJ2ItHN2zJA8syet3iKJidT+s2gYt8d2rBo0Ndlvo1gBLGLNl/Zc9yg==",
"peer": true,
"requires": {
"@koishijs/utils": "^5.4.5",
"cordis": "^1.1.1",
"cordis": "^1.3.3",
"fastest-levenshtein": "^1.0.12",
"minato": "^1.1.0"
}
......@@ -8814,13 +8794,6 @@
"@minatojs/driver-memory": "^1.0.3"
}
},
"@koishijs/plugin-help": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-help/-/plugin-help-1.0.0.tgz",
"integrity": "sha512-SvOZiSmtysQxnhOUG0He+/Ftxr+IuIbTApsK6KypRpQ4a1q7OuJWmKb2e+f62zS3GhMYBJ8qT0wRMU+TFPP3AQ==",
"peer": true,
"requires": {}
},
"@koishijs/plugin-sandbox": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-sandbox/-/plugin-sandbox-1.1.3.tgz",
......@@ -8828,13 +8801,6 @@
"dev": true,
"requires": {}
},
"@koishijs/plugin-suggest": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@koishijs/plugin-suggest/-/plugin-suggest-1.0.0.tgz",
"integrity": "sha512-6jmhymcygID59Z3UblAARGXflJoH0+Tj/qi20GNQO0bxrKkoW4qjxJhlmZe2uv+D1hvTO0q2Yv98iEMDhKyXxw==",
"peer": true,
"requires": {}
},
"@koishijs/segment": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@koishijs/segment/-/segment-1.1.1.tgz",
......@@ -10097,9 +10063,9 @@
"peer": true
},
"cordis": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/cordis/-/cordis-1.1.1.tgz",
"integrity": "sha512-l1tYxBqy+oEb3EKEvQAlH1g5BICDdnTdcIre1MuCY/qWO4bsrh97qd7jQe2Rq/+tg5HRqs7K6RgP5N/85c57xw==",
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/cordis/-/cordis-1.3.3.tgz",
"integrity": "sha512-mpyBWAEVYX8/YHoGWIqaOjrOk6DmtrOWZfsBSinNR+nDBlB39Ks6aC1B5oZ7AdnVoRE2ZYBCGecoHrlxcRxd6w==",
"peer": true,
"requires": {
"cosmokit": "^1.1.2"
......@@ -12054,15 +12020,13 @@
}
},
"koishi": {
"version": "4.7.1",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.7.1.tgz",
"integrity": "sha512-WtY2ZujFMP4/ySKCc08oXLe2dYlZsdZP7f2eUck1w3cdvOh3eAgndckBP7xpkICAL0l6BYxrbzurIYh32Qck6g==",
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/koishi/-/koishi-4.7.4.tgz",
"integrity": "sha512-VVHf3TyFsTuKrB8IZffxwmwiGx+zyhDo+DNNEFQjvomgqFdGEceAnLxNIf10K48aB1CDmkmi37b6uaURi4Z1Hw==",
"peer": true,
"requires": {
"@koa/router": "^10.1.1",
"@koishijs/core": "^4.7.1",
"@koishijs/plugin-help": "^1.0.0",
"@koishijs/plugin-suggest": "^1.0.0",
"@koishijs/core": "^4.7.4",
"@koishijs/utils": "^5.4.5",
"@types/koa": "*",
"@types/koa__router": "*",
......@@ -12073,7 +12037,7 @@
"koa-bodyparser": "^4.3.0",
"ns-require": "^1.1.2",
"parseurl": "^1.3.3",
"path-to-regexp": "^6.2.0",
"path-to-regexp": "^6.2.1",
"portfinder": "^1.0.28",
"proxy-agent": "^5.0.0",
"ws": "^8.6.0"
......@@ -12094,9 +12058,9 @@
}
},
"koishi-target-def": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/koishi-target-def/-/koishi-target-def-1.1.0.tgz",
"integrity": "sha512-y6BzP79CTixzXcPRLBJwO9r66j13ORkx8KJKWa6bBP1wUlXJFT0wfCSVKElbbr/I1/5SUd++qNVLHz5TmM/mQQ==",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/koishi-target-def/-/koishi-target-def-1.1.1.tgz",
"integrity": "sha512-OIWTCTCwX3HzUsyZ/j1lOvoLL3KyCL0jHhU9DcLkpKHiof1k1A0IMKAjndOoGKkzwRCGIDB31Y+aH1UQ0YKlTQ==",
"requires": {
"lodash": "^4.17.21"
}
......@@ -12603,9 +12567,9 @@
"dev": true
},
"path-to-regexp": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz",
"integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz",
"integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==",
"peer": true
},
"path-type": {
......
......@@ -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