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

[FEAT] 优化监听函数注册时,监听类型与实际参数不符的情况 #51

Closed
ForteScarlet opened this issue Jan 17, 2021 · 0 comments
Assignees
Labels
优化 优化 模块:核心 核心与api模块相关的
Milestone

Comments

@ForteScarlet
Copy link
Member

// 监听函数解析期间会输出警告日志,因为你监听了 GroupMsg, 而参数中的 PrivateMsg 却没有被监听,它在触发监听时会抛出异常。
@OnGroup
public void listen(PrivateMsg msg) {
    // ...    
}
// 监听函数解析期间会输出警告日志,因为你监听了 GroupMsg, 而参数中的 PrivateMsg 却没有被监听,它将永远为null。
@OnGroup
public void listen(@Depend(orIgnore = true) PrivateMsg msg) {
    // ...    
}
@ForteScarlet ForteScarlet added 优化 优化 模块:核心 核心与api模块相关的 labels Jan 17, 2021
@ForteScarlet ForteScarlet added this to the 2.0.0 milestone Jan 17, 2021
@ForteScarlet ForteScarlet self-assigned this Jan 17, 2021
@ForteScarlet ForteScarlet changed the title [OPT] 优化监听函数注册时,监听类型与实际参数不符的情况 [FEAT] 优化监听函数注册时,监听类型与实际参数不符的情况 Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
优化 优化 模块:核心 核心与api模块相关的
Projects
None yet
Development

No branches or pull requests

1 participant