Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
83064d0c
Commit
83064d0c
authored
Mar 23, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typos
parent
0bf290c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/RichMessage.kt
...onMain/kotlin/net.mamoe.mirai/message/data/RichMessage.kt
+14
-9
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/RichMessage.kt
View file @
83064d0c
...
@@ -7,19 +7,24 @@
...
@@ -7,19 +7,24 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
*/
@
file
:
JvmName
(
"MessageUtils"
)
@
file
:
JvmMultifileClass
package
net.mamoe.mirai.message.data
package
net.mamoe.mirai.message.data
import
net.mamoe.mirai.utils.MiraiExperimentalAPI
import
net.mamoe.mirai.utils.MiraiExperimentalAPI
import
net.mamoe.mirai.utils.SinceMirai
import
net.mamoe.mirai.utils.SinceMirai
import
kotlin.jvm.JvmMultifileClass
import
kotlin.jvm.JvmName
import
kotlin.jvm.JvmOverloads
import
kotlin.jvm.JvmOverloads
import
kotlin.jvm.JvmSynthetic
import
kotlin.jvm.JvmSynthetic
/**
/**
* XML 消息等富文本消息
* XML 消息等富文本消息
*
*
* @see XmlMessage
* @see XmlMessage
XML
* @see JsonMessage
* @see JsonMessage
JSON
* @see LightApp
* @see LightApp
小程序 (JSON)
*/
*/
// not using sealed class for customized implementations
// not using sealed class for customized implementations
@SinceMirai
(
"0.27.0"
)
@SinceMirai
(
"0.27.0"
)
...
@@ -31,7 +36,7 @@ interface RichMessage : MessageContent {
...
@@ -31,7 +36,7 @@ interface RichMessage : MessageContent {
@MiraiExperimentalAPI
@MiraiExperimentalAPI
@SinceMirai
(
"0.30.0"
)
@SinceMirai
(
"0.30.0"
)
fun
share
(
url
:
String
,
title
:
String
?
=
null
,
content
:
String
?
=
null
,
coverUrl
:
String
?
=
null
):
XmlMessage
=
fun
share
(
url
:
String
,
title
:
String
?
=
null
,
content
:
String
?
=
null
,
coverUrl
:
String
?
=
null
):
XmlMessage
=
buildX
ML
Message
{
buildX
ml
Message
{
templateId
=
12345
templateId
=
12345
serviceId
=
1
serviceId
=
1
action
=
"web"
action
=
"web"
...
@@ -75,7 +80,7 @@ class JsonMessage(override val content: String) : RichMessage {
...
@@ -75,7 +80,7 @@ class JsonMessage(override val content: String) : RichMessage {
}
}
/**
/**
* 小程序
分享
, 如音乐分享
* 小程序, 如音乐分享
*/
*/
@OptIn
(
MiraiExperimentalAPI
::
class
)
@OptIn
(
MiraiExperimentalAPI
::
class
)
@SinceMirai
(
"0.27.0"
)
@SinceMirai
(
"0.27.0"
)
...
@@ -90,7 +95,7 @@ class LightApp constructor(override val content: String) : RichMessage {
...
@@ -90,7 +95,7 @@ class LightApp constructor(override val content: String) : RichMessage {
/**
/**
* XML 消息, 如分享, 卡片等.
* XML 消息, 如分享, 卡片等.
*
*
* @see buildX
ML
Message
* @see buildX
ml
Message
*/
*/
@SinceMirai
(
"0.27.0"
)
@SinceMirai
(
"0.27.0"
)
@OptIn
(
MiraiExperimentalAPI
::
class
)
@OptIn
(
MiraiExperimentalAPI
::
class
)
...
@@ -108,8 +113,8 @@ class XmlMessage constructor(override val content: String) : RichMessage {
...
@@ -108,8 +113,8 @@ class XmlMessage constructor(override val content: String) : RichMessage {
@JvmSynthetic
@JvmSynthetic
@SinceMirai
(
"0.27.0"
)
@SinceMirai
(
"0.27.0"
)
@MiraiExperimentalAPI
@MiraiExperimentalAPI
inline
fun
buildX
MLMessage
(
block
:
@XMLDsl
XML
MessageBuilder
.()
->
Unit
):
XmlMessage
=
inline
fun
buildX
mlMessage
(
block
:
@XMLDsl
Xml
MessageBuilder
.()
->
Unit
):
XmlMessage
=
XmlMessage
(
X
ML
MessageBuilder
().
apply
(
block
).
text
)
XmlMessage
(
X
ml
MessageBuilder
().
apply
(
block
).
text
)
@Target
(
AnnotationTarget
.
CLASS
,
AnnotationTarget
.
FUNCTION
,
AnnotationTarget
.
TYPE
)
@Target
(
AnnotationTarget
.
CLASS
,
AnnotationTarget
.
FUNCTION
,
AnnotationTarget
.
TYPE
)
@DslMarker
@DslMarker
...
@@ -117,7 +122,7 @@ annotation class XMLDsl
...
@@ -117,7 +122,7 @@ annotation class XMLDsl
@Suppress
(
"MemberVisibilityCanBePrivate"
)
@Suppress
(
"MemberVisibilityCanBePrivate"
)
@XMLDsl
@XMLDsl
class
X
ML
MessageBuilder
(
class
X
ml
MessageBuilder
(
var
templateId
:
Int
=
1
,
var
templateId
:
Int
=
1
,
var
serviceId
:
Int
=
1
,
var
serviceId
:
Int
=
1
,
var
action
:
String
=
"plugin"
,
var
action
:
String
=
"plugin"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment