Skip to content

Commit

Permalink
fix(cli): koishi start reported unsupported type, fix #129
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Nov 16, 2020
1 parent 1566ac8 commit 5e5d118
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/koishi/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ process.on('message', (data: Message) => {
}
})

// load adapter
try {
const [name] = config.type.split('.', 1)
loadEcosystem('adapter', name)
} catch {}

const app = new App(config)

app.command('exit', '停止机器人运行', { authority: 4 })
Expand All @@ -123,12 +129,6 @@ app.command('exit', '停止机器人运行', { authority: 4 })
process.exit(514)
})

// load adapter
try {
const [name] = config.type.split('.', 1)
loadEcosystem('adapter', name)
} catch {}

// load plugins
if (Array.isArray(config.plugins)) {
for (const item of config.plugins) {
Expand Down

0 comments on commit 5e5d118

Please sign in to comment.