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

Bug: 手动调用 session.execute() 时不应将引用内容添加到 argv 中 #1441

Closed
DGCK81LNN opened this issue Aug 9, 2024 · 0 comments
Labels
bug BUG

Comments

@DGCK81LNN
Copy link
Contributor

DGCK81LNN commented Aug 9, 2024

Describe the bug

4.17.11 版本中,使用 session.execute() 调用指令会导致当前 session 的引用消息内容被添加到内部调用的指令参数中。

Steps to reproduce

ctx.command("foo [arg]").action(({ session }, arg) => {
  session.execute("bar")
  return <>foo 参数:{arg}</>
})

ctx.command("bar [arg]").action((_, arg) => {
  return <>bar 参数:{arg}</>
})

引用一条内容为“hello”的消息调用 foo 指令,输出“foo 参数:hello”“bar 参数:hello”

Expected behavior

foo 指令接收到引用参数 "hello"bar 指令不应接受到该内容作为参数。

Screenshots

No response

Versions

  • Node version: 20.15.0
  • Koishi version: 4.17.11

Additional context

4dd30f2#diff-d5cf16593756abe4ee64caf2b2ea6fefbb1e322a3349a5beb46079139d1f2812

@DGCK81LNN DGCK81LNN added the bug BUG label Aug 9, 2024
@shigma shigma closed this as completed in 1f41c20 Aug 13, 2024
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

1 participant