mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 21:27:47 +00:00
fix bug when group=0
This commit is contained in:
parent
0c7c923a58
commit
4a9d144882
1 changed files with 9 additions and 5 deletions
|
|
@ -1,11 +1,12 @@
|
||||||
|
import path from 'path'
|
||||||
|
import fs from 'fs'
|
||||||
|
import fetch from 'node-fetch'
|
||||||
|
import lodash from 'lodash'
|
||||||
|
import common from '../../../lib/common/common.js'
|
||||||
import {ZZZPlugin} from '../lib/plugin.js'
|
import {ZZZPlugin} from '../lib/plugin.js'
|
||||||
import {rulePrefix} from '../lib/common.js'
|
import {rulePrefix} from '../lib/common.js'
|
||||||
import {atlasToName} from '../lib/convert/char.js'
|
import {atlasToName} from '../lib/convert/char.js'
|
||||||
import path from 'path'
|
|
||||||
import fs from 'fs'
|
|
||||||
import {imageResourcesPath} from '../lib/path.js'
|
import {imageResourcesPath} from '../lib/path.js'
|
||||||
import fetch from 'node-fetch'
|
|
||||||
import lodash from 'lodash'
|
|
||||||
|
|
||||||
const ZZZ_GUIDES_PATH = path.join(imageResourcesPath, 'guides')
|
const ZZZ_GUIDES_PATH = path.join(imageResourcesPath, 'guides')
|
||||||
|
|
||||||
|
|
@ -43,6 +44,9 @@ export class Guide extends ZZZPlugin {
|
||||||
]
|
]
|
||||||
// 最大攻略数量
|
// 最大攻略数量
|
||||||
this.maxNum = this.source.length
|
this.maxNum = this.source.length
|
||||||
|
|
||||||
|
// 最大显示攻略数量
|
||||||
|
this.maxForwardGuides = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
async init () {
|
async init () {
|
||||||
|
|
@ -98,7 +102,7 @@ export class Guide extends ZZZPlugin {
|
||||||
msg.push(segment.image(`file://${guidePath}`))
|
msg.push(segment.image(`file://${guidePath}`))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (i < 4 && await this.getImg(role, i)) {
|
if (i < this.maxForwardGuides && await this.getImg(name, i)) {
|
||||||
msg.push(segment.image(`file://${guidePath}`))
|
msg.push(segment.image(`file://${guidePath}`))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue