mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
27 lines
545 B
JavaScript
27 lines
545 B
JavaScript
import Cfg from './Cfg.js'
|
|
import Render from './common/Render.js'
|
|
|
|
const Common = {
|
|
render: async function (arg1, arg2, arg3, arg4) {
|
|
if (arguments.length === 4 && typeof (arguments[1]) === 'string') {
|
|
return Render.render(arg2, arg3, {
|
|
...arg4,
|
|
plugin: arg1
|
|
})
|
|
} else {
|
|
return Render.render(arg1, arg2, arg3)
|
|
}
|
|
},
|
|
cfg: Cfg.get,
|
|
sleep (ms) {
|
|
return new Promise((resolve) => setTimeout(resolve, ms))
|
|
},
|
|
|
|
async downFile () {
|
|
console.log('down file')
|
|
}
|
|
|
|
}
|
|
|
|
export default Common
|