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] 基于响应值处理器实现快速回复 #54

Closed
ForteScarlet opened this issue Jan 20, 2021 · 2 comments
Closed

[FEAT] 基于响应值处理器实现快速回复 #54

ForteScarlet opened this issue Jan 20, 2021 · 2 comments
Assignees
Labels
模块:核心 核心与api模块相关的 特性 一个新特性,或者一个新的功能/能力
Milestone

Comments

@ForteScarlet
Copy link
Member

实现返回值快速回复,例如:
kotlin:

    /**
     * 监听 [私聊消息][PrivateMsg]与[群聊消息][GroupMsg],
     * 并在收到消息的时候统一回复 "Hello. this is Quick reply.", 如果在群聊中,会AT触发事件的人。
     * 其中,在群聊中需要被AT。
     */
    @Listens(
        value = [
            Listen(PrivateMsg::class),
            Listen(GroupMsg::class),
        ]
    )
    @Filters(atBot = true)
    fun listen() = Reply.reply("Hello. this is Quick reply.", at = true)

java:

   /** 与上述方法含义一样。 */
    @OnGroup
    @OnPrivate
    @Filters(atBot = true)
    public ReplyAble listen(){
        return Reply.reply("Hello. this is Quick reply.", true);
    }
@ForteScarlet ForteScarlet added 特性 一个新特性,或者一个新的功能/能力 模块:核心 核心与api模块相关的 labels Jan 20, 2021
@ForteScarlet ForteScarlet added this to the 2.0.0 milestone Jan 20, 2021
@ForteScarlet ForteScarlet self-assigned this Jan 20, 2021
@ForteScarlet
Copy link
Member Author

基于 #49

1 similar comment
@ForteScarlet
Copy link
Member Author

基于 #49

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