MiraiForum

    • 注册
    • 登录
    • 搜索
    • 热门
    • 最新
    • 未解决
    • 标签
    • 群组
    • 友情链接
    1. 主页
    2. Lappand233
    3. 帖子
    L
    • 资料
    • 关注 0
    • 粉丝 0
    • 主题 1
    • 帖子 3
    • 最佳 0
    • 有争议的 0
    • 群组 0

    Lappand233 发布的帖子

    • RE: 关于消息引用回复

      @rainchan 在 关于消息引用回复 中说:

      使用带有quote字样的方法就行,可以查看源代码中的注释

      不过对于kotlin新手来说不建议使用dsl

      @mrxiaom 在 关于消息引用回复 中说:

      我在 java 我是这么写的,仅供参考

      QuoteReply quote = new QuoteReply(event.getMessageSource());
      quote.plus("message here");
      // 然后 .sendMessage(quote);
      

      @yoonching 在 关于消息引用回复 中说:

      根据你的代码片段,我想可以这样:
      //TODO 这里该写什么?
      subject.sendMessage(message.quote() + "回复内容")

      @cssxsh 在 关于消息引用回复 中说:

      你可以应该用dsl语法

      subscribeMessages {
          "test1" containsReply "Hello World"
      
          "test2" containsReply {
              message.quote() + "Hello World"
          }
      
          contains("test3") reply {
              "Hello World"
          }
      
          contains("test4") quoteReply {
               "Hello World"
          }
      }
      

      尝试用this. 把可用的dsl方法列出来自己实验,自己多试试才能了解
      21-05-21_idea64_wsyrUgdmsT.png

      谢谢各位大佬的帮助

      发布在 开发交流
      L
      Lappand233
    • RE: 关于消息引用回复

      @cssxsh 在 关于消息引用回复 中说:

      你可以应该用dsl语法

      subscribeMessages {
          "test1" containsReply "Hello World"
      
          "test2" containsReply {
              message.quote() + "Hello World"
          }
      
          contains("test3") reply {
              "Hello World"
          }
      
          contains("test4") quoteReply {
               "Hello World"
          }
      }
      

      尝试用this. 把可用的dsl方法列出来自己实验,自己多试试才能了解
      21-05-21_idea64_wsyrUgdmsT.png

      初学kt,有一定的Java基础,还不懂dsl可以给个Demo参考下吗?谢谢大佬

      发布在 开发交流
      L
      Lappand233
    • 关于消息引用回复

      萌新第一次写插件,怎么才能实现如图的效果

      globalEventChannel().subscribeAlways<GroupMessageEvent> {
          if (message.content == "test") {
              //TODO 这里该写什么?
          }
      }
      
      发布在 开发交流
      L
      Lappand233
    • 1 / 1