Commit 2ef63e82 authored by nanahira's avatar nanahira

fix replace

parent 7ea76bed
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.5.0", "koishi": "^4.5.0",
"koishi-plugin-pics": "^8.7.5" "koishi-plugin-pics": "^8.7.7"
} }
}, },
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
...@@ -5291,9 +5291,9 @@ ...@@ -5291,9 +5291,9 @@
} }
}, },
"node_modules/koishi-plugin-pics": { "node_modules/koishi-plugin-pics": {
"version": "8.7.5", "version": "8.7.7",
"resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-8.7.5.tgz", "resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-8.7.7.tgz",
"integrity": "sha512-69tm7HfGaYzRRkZX9QpfOfH85QJgSQ/M77NyX7Rwpm9WGwU9DF7/I98IRbhFVxtqb1v+9YW70tII5gt6tMpWpA==", "integrity": "sha512-BrglgEq7G2yTqCe7gSu9GbPNQ6ULgQlLa5YpYzppr5R96Q09eQvkcQ4kmKn2AKpD2neM/+x3WsHiicXysM3pSw==",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"koishi-thirdeye": "^9.2.18", "koishi-thirdeye": "^9.2.18",
...@@ -11851,9 +11851,9 @@ ...@@ -11851,9 +11851,9 @@
} }
}, },
"koishi-plugin-pics": { "koishi-plugin-pics": {
"version": "8.7.5", "version": "8.7.7",
"resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-8.7.5.tgz", "resolved": "https://registry.npmjs.org/koishi-plugin-pics/-/koishi-plugin-pics-8.7.7.tgz",
"integrity": "sha512-69tm7HfGaYzRRkZX9QpfOfH85QJgSQ/M77NyX7Rwpm9WGwU9DF7/I98IRbhFVxtqb1v+9YW70tII5gt6tMpWpA==", "integrity": "sha512-BrglgEq7G2yTqCe7gSu9GbPNQ6ULgQlLa5YpYzppr5R96Q09eQvkcQ4kmKn2AKpD2neM/+x3WsHiicXysM3pSw==",
"peer": true, "peer": true,
"requires": { "requires": {
"koishi-thirdeye": "^9.2.18", "koishi-thirdeye": "^9.2.18",
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.5.0", "koishi": "^4.5.0",
"koishi-plugin-pics": "^8.7.5" "koishi-plugin-pics": "^8.7.7"
}, },
"devDependencies": { "devDependencies": {
"@koishijs/plugin-cache-lru": "^1.0.0-rc.0", "@koishijs/plugin-cache-lru": "^1.0.0-rc.0",
......
...@@ -43,7 +43,7 @@ export default class AutoPicPlugin ...@@ -43,7 +43,7 @@ export default class AutoPicPlugin
this.logger.debug(`Sending image ${pic.url} from ${target.bot}.`); this.logger.debug(`Sending image ${pic.url} from ${target.bot}.`);
let targetMessage = message; let targetMessage = message;
if (this.pics.isOneBotBot(this.bots.get(target.bot))) { if (this.pics.isOneBotBot(this.bots.get(target.bot))) {
targetMessage = message.replace(/,url=/, ',file='); targetMessage = message.replace(/,url=base64/, ',file=base64');
} }
const ids = await target.send(this.bots, targetMessage); const ids = await target.send(this.bots, targetMessage);
this.logger.debug( this.logger.debug(
......
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