Skip to content

为 Java 用户提供 DSL 方式构建消息。 #39

@IceCream-QAQ

Description

@IceCream-QAQ

举例演示。

        buildMessage(() -> {
            textLine("%s,您好。", member.getNameCard());
            if (memberGirlsNow == 0){
                text("您当前还没有老婆!");
                return;
            }

            for (String girl : girls) {
                textLine("-------------");
                textLine("老婆:%s。",girl);
                imageByFile();
            }

            if (memberGirlsNow == memberGirlsMax){
                textLine("-------------");
                text("您的老婆已达上限!");
            }
        });

相比于 LineQ 方式,DSL 方式在承载业务上,要轻松的多。
LineQ 主要用于非承载业务的复杂消息构建。
DSL 主要用于承载业务的复杂消息构建。

Metadata

Metadata

Assignees

No one assigned

    Labels

    大饼相对于饼而言,它获得实现的时间要稍晚。需求一个新的功能建议

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions