Commit a5add743 authored by nanahira's avatar nanahira

add preferFile and fix

parent ac6c3196
...@@ -234,8 +234,8 @@ export default class PicsContainer ...@@ -234,8 +234,8 @@ export default class PicsContainer
async getSegment(url: string, bot?: Bot) { async getSegment(url: string, bot?: Bot) {
url = await this.resolveUrl(url); url = await this.resolveUrl(url);
const picData: segment.Data = { const picData: segment.Data = {
[url.startsWith('base64://') && [(url.startsWith('base64://') && this.isOneBotBot(bot)) ||
(this.isOneBotBot(bot) || this.config.preferFile) this.config.preferFile
? 'file' ? 'file'
: 'url']: url, : 'url']: url,
cache: true, cache: true,
......
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