koishijs / novelai-bot

Generate images by NovelAI | 基于 NovelAI 的画图机器人
https://bot.novelai.dev
MIT License
2.49k stars 204 forks source link

Bug: TypeError on every invoke in Discord #197

Closed MaikoTan closed 1 year ago

MaikoTan commented 1 year ago

Describe the bug

Every time I enter /nai in Discord with some prompt w/ or w/o negative prompt, it would always returns 发生未知错误. But this never happens with the OneBot adapter.

Steps to reproduce

  1. Install the plugin
  2. Enter /nai (loli)
  3. Got the erreur !

Expected behavior

Parse the input properly and then return the generation back.

Screenshots

No response

Relevant log output

2023-05-01 11:10:47 2023-05-01 03:10:47 [W] command novelai (loli)
2023-05-01 11:10:47                         TypeError: Cannot read properties of undefined (reading 'split')
2023-05-01 11:10:47                             at appendToList (/app/node_modules/koishi-plugin-novelai/lib/config.js:302:28)
2023-05-01 11:10:47                             at parseInput (/app/node_modules/koishi-plugin-novelai/lib/config.js:345:9)
2023-05-01 11:10:47                             at _Command.<anonymous> (/app/node_modules/koishi-plugin-novelai/lib/index.js:167:63)
2023-05-01 11:10:47                             at Array.<anonymous> (/app/node_modules/@koishijs/core/lib/index.cjs:1660:27)
2023-05-01 11:10:47                             at Object.argv.next (/app/node_modules/@koishijs/core/lib/index.cjs:1672:60)
2023-05-01 11:10:47                             at _Command.execute (/app/node_modules/@koishijs/core/lib/index.cjs:1675:33)
2023-05-01 11:10:47                             at runMicrotasks (<anonymous>)
2023-05-01 11:10:47                             at processTicksAndRejections (node:internal/process/task_queues:96:5)
2023-05-01 11:10:47                             at async /app/node_modules/@koishijs/core/lib/index.cjs:2240:22
2023-05-01 11:10:47                             at async Session2.withScope (/app/node_modules/@koishijs/core/lib/index.cjs:2119:14)

Launcher

Containers (Docker, Kubernates, etc)

Backend

Stable Horde

Versions

Additional context

No response