koishijs / koishi

Cross-platform chatbot framework made with love
https://koishi.chat
MIT License
4.5k stars 247 forks source link

commandPrefix使用array做参数会抛出TypeError #8

Closed arily closed 4 years ago

arily commented 4 years ago

Describe the bug https://koishijs.github.io/guide/command-system.html#指令前缀 根据这里的文档commandPrefix可以提供array来实现多前缀触发指令。 但当我提供array时会抛出错误。 /node_modules/escape-string-regexp/index.js:7 throw new TypeError('Expected a string');

To Reproduce

const app = new App({
...
  commandPrefix: ["!","!"],
})

Expected behavior 数组中提供的所有前缀都可触发bot指令

Screenshots

image

Versions

Additional context

shigma commented 4 years ago

@arily 这个特性应该是 1.0.0-alpha.9 引入的,尽量更新到最新版吧

arily commented 4 years ago

Ok