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

onebot 中 bot.$sendGroupNotice 似乎出现问题 #191

Closed
dragon-fish opened this issue Mar 28, 2021 · 5 comments
Closed

onebot 中 bot.$sendGroupNotice 似乎出现问题 #191

dragon-fish opened this issue Mar 28, 2021 · 5 comments
Assignees

Comments

@dragon-fish
Copy link
Member

Describe the bug

RT

To Reproduce

假定一个最简单的指令:

App.platform('onebot')
  .group()
  .command('announcement <content:text>', '', { authority: 3 })
  .action(async ({ session }, content) => {
    if (!content) return
    await session.bot.$sendGroupNotice(session.groupId, content)
  })

发送:announcement 群公告

报错:

SenderError: Error when trying to send to send_group_notice, args: {"group_id":"123456","content":"群公告"}, retcode: 404
    at CQBot.get (C:\QQbot-SILI\node_modules\koishi-adapter-onebot\dist\index.js:314:13)
        -> (C:\QQbot-SILI\node_modules\koishi-adapter-onebot\src\bot.ts:79:13)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
    at async CQBot.<computed> [as $sendGroupNotice] (C:\QQbot-SILI\node_modules\koishi-adapter-onebot\dist\index.js:417:18)
        -> (C:\QQbot-SILI\node_modules\koishi-adapter-onebot\src\bot.ts:200:18)

Expected behavior

可以发送群公告

Screenshots

Versions

  • OS: [e.g. iOS]
  • Node Version: [e.g. 10.16.0]
  • CQHTTP Version: v0.9.40-fix3 (websocket)
  • koishi: ^3.5.1
  • adapter-onebot: ^3.0.0

Additional context

@shigma
Copy link
Member

shigma commented Mar 28, 2021

不如等 go-cqhttp 更新吧?

@dragon-fish
Copy link
Member Author

不如等 go-cqhttp 更新吧?

= =

@dragon-fish
Copy link
Member Author

「漫长的岁月里,我一直在等待……」—— 机智的小鱼君

@shigma
Copy link
Member

shigma commented Mar 28, 2021

问了下 go-cqhttp 那边,似乎不打算改。那我下个版本就改吧。

@shigma shigma added the bug BUG label Mar 28, 2021
@dragon-fish
Copy link
Member Author

dragon-fish commented Mar 28, 2021

「……那一位手持koishi牌啤酒的大英雄,Shigma」—— 机智的小鱼君

@shigma shigma closed this as completed in dc7d832 Mar 31, 2021
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