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

plugin-common 中未配置 onGroupMemberRequest 时报错 #209

Closed
dragon-fish opened this issue Apr 6, 2021 · 0 comments
Closed

plugin-common 中未配置 onGroupMemberRequest 时报错 #209

dragon-fish opened this issue Apr 6, 2021 · 0 comments
Assignees
Labels
bug BUG

Comments

@dragon-fish
Copy link
Member

Describe the bug
如果在 plugin-common 的配置项中没有配置 onGroupMemberRequest,bot 收到入群申请时会报错 TypeError: result is not iterable (cannot read property undefined)

To Reproduce

  1. 假设简单的注册了插件未作任何配置
    App.plugin(require('koishi-plugin-common'), {})
  2. 将 bot 设置为管理员以便接受入群申请消息。
  3. 有用户申请入群:see bug

Expected behavior

既不做处理,也不报错

Screenshots

TypeError: result is not iterable (cannot read property undefined)
    at _Session.<anonymous> (C:\QQbot-SILI\node_modules\koishi-plugin-common\lib\index.js:682:24)
        -> (C:\QQbot-SILI\node_modules\koishi-plugin-common\src\handler.ts:114:24)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
    at async Promise.all (index 1)

Versions

  • OS: [e.g. iOS]
  • Node Version: [e.g. 10.16.0] 15.4.0
  • CoolQ Version: 1.0.0-beta.1
  • CQHTTP Version: -
  • Koishi Version: 3.7.0
  • plugin-common: 4.2.1

Additional context

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

No branches or pull requests

2 participants