Skip to content

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

Closed
@ForteScarlet

Description

@ForteScarlet

实现返回值快速回复,例如:
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);
    }

Metadata

Metadata

Assignees

Labels

模块:核心核心与api模块相关的特性一个新特性,或者一个新的功能/能力

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions