Skip to content

Commit

Permalink
fix[onebot11]: fix cq message chain
Browse files Browse the repository at this point in the history
  • Loading branch information
RTAkland committed Jan 30, 2025
1 parent cb0eb41 commit 9e2026f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 1 files
+2 −73 docs/ChatConnector.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import cn.rtast.rob.enums.MusicShareType
import cn.rtast.rob.enums.PokeMessage
import cn.rtast.rob.enums.QQFace

inline fun cqMessageChain(builder: MessageChain.Builder.() -> Unit) =
MessageChain.Builder().apply(builder).build()

@Deprecated(
"CQ Code message chain is not support now, use MessageChain instead",
replaceWith = ReplaceWith("MessageChain"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
* Date: 2025/1/27
*/

@file:Suppress("unused", "DEPRECATION")

package cn.rtast.rob.onebot.dsl

import cn.rtast.rob.onebot.CQMessageChain
import cn.rtast.rob.onebot.MessageChain

/**
Expand All @@ -15,3 +17,8 @@ import cn.rtast.rob.onebot.MessageChain
inline fun messageChain(builder: MessageChain.Builder.() -> Unit) =
MessageChain.Builder().apply(builder).build()

/**
* dsl 风格构造一个[CQMessageChain]
*/
inline fun cqMessageChain(builder: CQMessageChain.Builder.() -> Unit) =
CQMessageChain.Builder().apply(builder).build()

0 comments on commit 9e2026f

Please sign in to comment.