Commit 65358b31 authored by nanahira's avatar nanahira

bump

parent d2d88734
......@@ -12,10 +12,10 @@ const app = new Context({
});
// Console and sandbox
app.plugin(SandboxPlugin);
app.plugin(ConsolePlugin, {
open: false,
});
app.plugin(SandboxPlugin);
// Database
app.plugin(DatabasePlugin);
......
This diff is collapsed.
......@@ -27,13 +27,13 @@
},
"homepage": "https://github.com/koishijs/koishi-plugin-pics",
"dependencies": {
"koishi-thirdeye": "^11.0.12",
"koishi-thirdeye": "^11.1.0",
"lodash": "^4.17.21"
},
"devDependencies": {
"@koishijs/plugin-console": "^4.1.1",
"@koishijs/plugin-database-memory": "^1.4.1",
"@koishijs/plugin-sandbox": "^2.0.1",
"@koishijs/plugin-console": "^4.5.4",
"@koishijs/plugin-database-memory": "^1.5.0",
"@koishijs/plugin-sandbox": "^2.2.9",
"@types/jest": "^27.4.0",
"@types/lodash": "^4.14.176",
"@types/node": "^16.11.4",
......@@ -56,7 +56,7 @@
"ws": "^8.3.0"
},
"peerDependencies": {
"koishi": "^4.8.7"
"koishi": "^4.9.1"
},
"jest": {
"moduleFileExtensions": [
......
......@@ -230,14 +230,14 @@ export default class PicsContainer
async getSegment(url: string, bot?: Bot) {
url = await this.resolveUrl(url);
const picData: segment.Data = {
const picData = {
[(url.startsWith('base64://') && this.isOneBotBot(bot)) ||
this.config.preferFile
? 'file'
: 'url']: url,
cache: true,
cache: 'true',
};
return segment('image', picData);
return segment('image', picData, []);
}
private installDefaultMiddlewares() {
......@@ -287,7 +287,7 @@ export default class PicsContainer
return notFound();
}
let msg = await this.getSegment(result.url, bot);
let msg = (await this.getSegment(result.url, bot)).toString();
if (result.description) {
msg += `\n${result.description}`;
}
......
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