Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command解析出现了一些问题,没有避免原生属性访问 #232

Closed
NWYLZW opened this issue Apr 15, 2021 · 0 comments
Closed

command解析出现了一些问题,没有避免原生属性访问 #232

NWYLZW opened this issue Apr 15, 2021 · 0 comments

Comments

@NWYLZW
Copy link
Contributor

NWYLZW commented Apr 15, 2021

Describe the bug
解析command时
会将一些原生属性访问到
例如toString,proto

To Reproduce
在有机器人的频道或私聊时发送
toString $args
proto
之类的

Expected behavior
期望不触发bug

Screenshots
一些日志

[W] session toString 123
    TypeError: argv.command.parse is not a function
        at _Session.resolve (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-core\src\session.ts:325:53)
        at _App._process (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-core\src\app.ts:261:18)
        at processTicksAndRejections (internal/process/task_queues.js:93:5)
        at next (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-core\src\app.ts:310:16)
        at next (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-core\src\app.ts:310:16)
        at next (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-core\src\app.ts:310:16)
        at _App._handleMessage (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-core\src\app.ts:321:5)
        at async Promise.all (index 0)Middleware stack:
      - F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-plugin-common\src\admin.ts:274:23
      - F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-plugin-webui\src\server.ts:94:14
[W] session __proto__
    TypeError: Cannot read property 'set' of undefined
        at bind (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-plugin-common\src\admin.ts:261:34)
        at processTicksAndRejections (internal/process/task_queues.js:93:5)
        at Array.<anonymous> (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-plugin-common\src\admin.ts:290:9)
        at next (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-core\src\app.ts:310:16)
        at next (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-core\src\app.ts:310:16)
        at _App._handleMessage (F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-core\src\app.ts:321:5)
        at async Promise.all (index 0)Middleware stack:
      - F:\version-control\GIT\nodejs\tool-bot\node_modules\koishi-plugin-webui\src\server.ts:86:49

Versions
3.9.0

  • OS: win10 20h2
  • Node Version: 14.6.0
  • CoolQ Version: none
  • CQHTTP Version: 1.0.1-beta-3
  • Koishi Version: 3.9.0

Additional context
null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants