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
128125ee
Commit
128125ee
authored
Apr 28, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support more poke messages
parent
3c98151f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
49 deletions
+111
-49
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/convension.kt
...in/kotlin/net/mamoe/mirai/qqandroid/message/convension.kt
+10
-2
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/HummerCommelem.kt
...i/qqandroid/network/protocol/data/proto/HummerCommelem.kt
+39
-39
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/HummerMessage.kt
...Main/kotlin/net.mamoe.mirai/message/data/HummerMessage.kt
+62
-8
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/convension.kt
View file @
128125ee
...
@@ -120,7 +120,9 @@ internal fun MessageChain.toRichTextElems(forGroup: Boolean, withGeneralFlags: B
...
@@ -120,7 +120,9 @@ internal fun MessageChain.toRichTextElems(forGroup: Boolean, withGeneralFlags: B
businessType
=
it
.
type
,
businessType
=
it
.
type
,
pbElem
=
HummerCommelem
.
MsgElemInfoServtype2
(
pbElem
=
HummerCommelem
.
MsgElemInfoServtype2
(
pokeType
=
it
.
type
,
pokeType
=
it
.
type
,
vaspokeId
=
it
.
id
vaspokeId
=
it
.
id
,
vaspokeMinver
=
"7.2.0"
,
vaspokeName
=
it
.
name
).
toByteArray
(
HummerCommelem
.
MsgElemInfoServtype2
.
serializer
())
).
toByteArray
(
HummerCommelem
.
MsgElemInfoServtype2
.
serializer
())
)
)
)
)
...
@@ -383,7 +385,13 @@ internal fun List<ImMsgBody.Elem>.joinToMessageChain(groupIdOrZero: Long, bot: B
...
@@ -383,7 +385,13 @@ internal fun List<ImMsgBody.Elem>.joinToMessageChain(groupIdOrZero: Long, bot: B
when
(
element
.
commonElem
.
serviceType
)
{
when
(
element
.
commonElem
.
serviceType
)
{
2
->
{
2
->
{
val
proto
=
element
.
commonElem
.
pbElem
.
loadAs
(
HummerCommelem
.
MsgElemInfoServtype2
.
serializer
())
val
proto
=
element
.
commonElem
.
pbElem
.
loadAs
(
HummerCommelem
.
MsgElemInfoServtype2
.
serializer
())
list
.
add
(
PokeMessage
(
proto
.
pokeType
,
proto
.
vaspokeId
))
list
.
add
(
PokeMessage
(
proto
.
vaspokeName
.
takeIf
{
it
.
isNotEmpty
()
}
?:
PokeMessage
.
values
.
firstOrNull
{
it
.
id
==
proto
.
vaspokeId
&&
it
.
type
==
proto
.
pokeType
}
?.
name
.
orEmpty
(),
proto
.
pokeType
,
proto
.
vaspokeId
))
}
}
3
->
{
3
->
{
val
proto
=
element
.
commonElem
.
pbElem
.
loadAs
(
HummerCommelem
.
MsgElemInfoServtype3
.
serializer
())
val
proto
=
element
.
commonElem
.
pbElem
.
loadAs
(
HummerCommelem
.
MsgElemInfoServtype3
.
serializer
())
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/data/proto/HummerCommelem.kt
View file @
128125ee
...
@@ -17,7 +17,7 @@ import kotlin.jvm.JvmField
...
@@ -17,7 +17,7 @@ import kotlin.jvm.JvmField
internal
class
HummerCommelem
:
ProtoBuf
{
internal
class
HummerCommelem
:
ProtoBuf
{
@Serializable
@Serializable
internal
class
MsgElemInfoServtype1
(
internal
class
MsgElemInfoServtype1
(
@ProtoId
(
1
)
@JvmField
val
rewardId
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
1
)
@JvmField
val
rewardId
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
senderUin
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
senderUin
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
picType
:
Int
=
0
,
@ProtoId
(
3
)
@JvmField
val
picType
:
Int
=
0
,
...
@@ -33,7 +33,7 @@ internal class MsgElemInfoServtype1(
...
@@ -33,7 +33,7 @@ internal class MsgElemInfoServtype1(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype11
(
internal
class
MsgElemInfoServtype11
(
@ProtoId
(
1
)
@JvmField
val
resID
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
1
)
@JvmField
val
resID
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
resMD5
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
resMD5
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
reserveInfo1
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
reserveInfo1
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
...
@@ -45,19 +45,19 @@ internal class MsgElemInfoServtype11(
...
@@ -45,19 +45,19 @@ internal class MsgElemInfoServtype11(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype13
(
internal
class
MsgElemInfoServtype13
(
@ProtoId
(
1
)
@JvmField
val
sysHeadId
:
Int
=
0
,
@ProtoId
(
1
)
@JvmField
val
sysHeadId
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
headFlag
:
Int
=
0
@ProtoId
(
2
)
@JvmField
val
headFlag
:
Int
=
0
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype14
(
internal
class
MsgElemInfoServtype14
(
@ProtoId
(
1
)
@JvmField
val
id
:
Int
=
0
,
@ProtoId
(
1
)
@JvmField
val
id
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
reserveInfo
:
ByteArray
=
EMPTY_BYTE_ARRAY
@ProtoId
(
2
)
@JvmField
val
reserveInfo
:
ByteArray
=
EMPTY_BYTE_ARRAY
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype15
(
internal
class
MsgElemInfoServtype15
(
@ProtoId
(
1
)
@JvmField
val
vid
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
1
)
@JvmField
val
vid
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
cover
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
cover
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
title
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
title
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
...
@@ -69,7 +69,7 @@ internal class MsgElemInfoServtype15(
...
@@ -69,7 +69,7 @@ internal class MsgElemInfoServtype15(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype16
(
internal
class
MsgElemInfoServtype16
(
@ProtoId
(
1
)
@JvmField
val
uid
:
Long
=
0L
,
@ProtoId
(
1
)
@JvmField
val
uid
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
unionID
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
unionID
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
storyID
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
storyID
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
...
@@ -85,7 +85,7 @@ internal class MsgElemInfoServtype16(
...
@@ -85,7 +85,7 @@ internal class MsgElemInfoServtype16(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype18
(
internal
class
MsgElemInfoServtype18
(
@ProtoId
(
1
)
@JvmField
val
currentAmount
:
Long
=
0L
,
@ProtoId
(
1
)
@JvmField
val
currentAmount
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
totalAmount
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
totalAmount
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
listid
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
listid
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
...
@@ -94,18 +94,18 @@ internal class MsgElemInfoServtype18(
...
@@ -94,18 +94,18 @@ internal class MsgElemInfoServtype18(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype19
(
internal
class
MsgElemInfoServtype19
(
@ProtoId
(
1
)
@JvmField
val
data
:
ByteArray
=
EMPTY_BYTE_ARRAY
@ProtoId
(
1
)
@JvmField
val
data
:
ByteArray
=
EMPTY_BYTE_ARRAY
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype2
(
internal
class
MsgElemInfoServtype2
(
@ProtoId
(
1
)
@JvmField
val
pokeType
:
Int
=
0
,
@ProtoId
(
1
)
@JvmField
val
pokeType
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
pokeSummary
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
pokeSummary
:
String
=
""
,
@ProtoId
(
3
)
@JvmField
val
doubleHit
:
Int
=
0
,
@ProtoId
(
3
)
@JvmField
val
doubleHit
:
Int
=
0
,
@ProtoId
(
4
)
@JvmField
val
vaspokeId
:
Int
=
0
,
@ProtoId
(
4
)
@JvmField
val
vaspokeId
:
Int
=
0
,
@ProtoId
(
5
)
@JvmField
val
vaspokeName
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
5
)
@JvmField
val
vaspokeName
:
String
=
""
,
@ProtoId
(
6
)
@JvmField
val
vaspokeMinver
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
6
)
@JvmField
val
vaspokeMinver
:
String
=
""
,
@ProtoId
(
7
)
@JvmField
val
pokeStrength
:
Int
=
0
,
@ProtoId
(
7
)
@JvmField
val
pokeStrength
:
Int
=
0
,
@ProtoId
(
8
)
@JvmField
val
msgType
:
Int
=
0
,
@ProtoId
(
8
)
@JvmField
val
msgType
:
Int
=
0
,
@ProtoId
(
9
)
@JvmField
val
faceBubbleCount
:
Int
=
0
,
@ProtoId
(
9
)
@JvmField
val
faceBubbleCount
:
Int
=
0
,
...
@@ -113,25 +113,25 @@ internal class MsgElemInfoServtype2(
...
@@ -113,25 +113,25 @@ internal class MsgElemInfoServtype2(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype20
(
internal
class
MsgElemInfoServtype20
(
@ProtoId
(
1
)
@JvmField
val
data
:
ByteArray
=
EMPTY_BYTE_ARRAY
@ProtoId
(
1
)
@JvmField
val
data
:
ByteArray
=
EMPTY_BYTE_ARRAY
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype21
(
internal
class
MsgElemInfoServtype21
(
@ProtoId
(
1
)
@JvmField
val
topicId
:
Int
=
0
,
@ProtoId
(
1
)
@JvmField
val
topicId
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
confessorUin
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
confessorUin
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
confessorNick
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
confessorNick
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
4
)
@JvmField
val
confessorSex
:
Int
=
0
,
@ProtoId
(
4
)
@JvmField
val
confessorSex
:
Int
=
0
,
@ProtoId
(
5
)
@JvmField
val
sysmsgFlag
:
Int
=
0
,
@ProtoId
(
5
)
@JvmField
val
sysmsgFlag
:
Int
=
0
,
@ProtoId
(
6
)
@JvmField
val
c2cConfessCtx
:
HummerCommelem
.
MsgElemInfoServtype21
.
C2CConfessContext
?
=
null
,
@ProtoId
(
6
)
@JvmField
val
c2cConfessCtx
:
C2CConfessContext
?
=
null
,
@ProtoId
(
7
)
@JvmField
val
topic
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
7
)
@JvmField
val
topic
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
8
)
@JvmField
val
confessTime
:
Long
=
0L
,
@ProtoId
(
8
)
@JvmField
val
confessTime
:
Long
=
0L
,
@ProtoId
(
9
)
@JvmField
val
groupConfessMsg
:
HummerCommelem
.
MsgElemInfoServtype21
.
GroupConfessMsg
?
=
null
,
@ProtoId
(
9
)
@JvmField
val
groupConfessMsg
:
GroupConfessMsg
?
=
null
,
@ProtoId
(
10
)
@JvmField
val
groupConfessCtx
:
HummerCommelem
.
MsgElemInfoServtype21
.
GroupConfessContext
?
=
null
@ProtoId
(
10
)
@JvmField
val
groupConfessCtx
:
GroupConfessContext
?
=
null
)
:
ProtoBuf
{
)
:
ProtoBuf
{
@Serializable
@Serializable
internal
class
C2CConfessContext
(
internal
class
C2CConfessContext
(
@ProtoId
(
1
)
@JvmField
val
confessorUin
:
Long
=
0L
,
@ProtoId
(
1
)
@JvmField
val
confessorUin
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
confessToUin
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
confessToUin
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
sendUin
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
sendUin
:
Long
=
0L
,
...
@@ -147,7 +147,7 @@ internal class C2CConfessContext(
...
@@ -147,7 +147,7 @@ internal class C2CConfessContext(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
GroupConfessContext
(
internal
class
GroupConfessContext
(
@ProtoId
(
1
)
@JvmField
val
confessorUin
:
Long
=
0L
,
@ProtoId
(
1
)
@JvmField
val
confessorUin
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
confessToUin
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
confessToUin
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
sendUin
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
sendUin
:
Long
=
0L
,
...
@@ -161,7 +161,7 @@ internal class GroupConfessContext(
...
@@ -161,7 +161,7 @@ internal class GroupConfessContext(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
GroupConfessItem
(
internal
class
GroupConfessItem
(
@ProtoId
(
1
)
@JvmField
val
topicId
:
Int
=
0
,
@ProtoId
(
1
)
@JvmField
val
topicId
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
confessToUin
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
confessToUin
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
confessToNick
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
confessToNick
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
...
@@ -170,32 +170,32 @@ internal class GroupConfessItem(
...
@@ -170,32 +170,32 @@ internal class GroupConfessItem(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
GroupConfessMsg
(
internal
class
GroupConfessMsg
(
@ProtoId
(
1
)
@JvmField
val
confessTime
:
Long
=
0L
,
@ProtoId
(
1
)
@JvmField
val
confessTime
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
confessorUin
:
Long
=
0L
,
@ProtoId
(
2
)
@JvmField
val
confessorUin
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
confessorSex
:
Int
=
0
,
@ProtoId
(
3
)
@JvmField
val
confessorSex
:
Int
=
0
,
@ProtoId
(
4
)
@JvmField
val
sysmsgFlag
:
Int
=
0
,
@ProtoId
(
4
)
@JvmField
val
sysmsgFlag
:
Int
=
0
,
@ProtoId
(
5
)
@JvmField
val
confessItems
:
List
<
HummerCommelem
.
MsgElemInfoServtype21
.
GroupConfessItem
>?
=
null
,
@ProtoId
(
5
)
@JvmField
val
confessItems
:
List
<
GroupConfessItem
>?
=
null
,
@ProtoId
(
6
)
@JvmField
val
totalTopicCount
:
Int
=
0
@ProtoId
(
6
)
@JvmField
val
totalTopicCount
:
Int
=
0
)
:
ProtoBuf
)
:
ProtoBuf
}
}
@Serializable
@Serializable
internal
class
MsgElemInfoServtype23
(
internal
class
MsgElemInfoServtype23
(
@ProtoId
(
1
)
@JvmField
val
faceType
:
Int
=
0
,
@ProtoId
(
1
)
@JvmField
val
faceType
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
faceBubbleCount
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
faceBubbleCount
:
Int
=
0
,
@ProtoId
(
3
)
@JvmField
val
faceSummary
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
faceSummary
:
String
=
""
,
@ProtoId
(
4
)
@JvmField
val
flag
:
Int
=
0
,
@ProtoId
(
4
)
@JvmField
val
flag
:
Int
=
0
,
@ProtoId
(
5
)
@JvmField
val
others
:
ByteArray
=
EMPTY_BYTE_ARRAY
@ProtoId
(
5
)
@JvmField
val
others
:
ByteArray
=
EMPTY_BYTE_ARRAY
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype24
(
internal
class
MsgElemInfoServtype24
(
@ProtoId
(
1
)
@JvmField
val
limitChatEnter
:
HummerCommelem
.
MsgElemInfoServtype24
.
LimitChatEnter
?
=
null
,
@ProtoId
(
1
)
@JvmField
val
limitChatEnter
:
LimitChatEnter
?
=
null
,
@ProtoId
(
2
)
@JvmField
val
limitChatExit
:
HummerCommelem
.
MsgElemInfoServtype24
.
LimitChatExit
?
=
null
@ProtoId
(
2
)
@JvmField
val
limitChatExit
:
LimitChatExit
?
=
null
)
:
ProtoBuf
{
)
:
ProtoBuf
{
@Serializable
@Serializable
internal
class
LimitChatEnter
(
internal
class
LimitChatEnter
(
@ProtoId
(
1
)
@JvmField
val
tipsWording
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
1
)
@JvmField
val
tipsWording
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
leftChatTime
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
leftChatTime
:
Int
=
0
,
@ProtoId
(
3
)
@JvmField
val
matchTs
:
Long
=
0L
,
@ProtoId
(
3
)
@JvmField
val
matchTs
:
Long
=
0L
,
...
@@ -206,42 +206,42 @@ internal class LimitChatEnter(
...
@@ -206,42 +206,42 @@ internal class LimitChatEnter(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
LimitChatExit
(
internal
class
LimitChatExit
(
@ProtoId
(
1
)
@JvmField
val
exitMethod
:
Int
=
0
,
@ProtoId
(
1
)
@JvmField
val
exitMethod
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
matchTs
:
Long
=
0L
@ProtoId
(
2
)
@JvmField
val
matchTs
:
Long
=
0L
)
:
ProtoBuf
)
:
ProtoBuf
}
}
@Serializable
@Serializable
internal
class
MsgElemInfoServtype27
(
internal
class
MsgElemInfoServtype27
(
@ProtoId
(
1
)
@JvmField
val
videoFile
:
ImMsgBody
.
VideoFile
?
=
null
@ProtoId
(
1
)
@JvmField
val
videoFile
:
ImMsgBody
.
VideoFile
?
=
null
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype29
(
internal
class
MsgElemInfoServtype29
(
@ProtoId
(
1
)
@JvmField
val
luckybagMsg
:
ByteArray
=
EMPTY_BYTE_ARRAY
@ProtoId
(
1
)
@JvmField
val
luckybagMsg
:
ByteArray
=
EMPTY_BYTE_ARRAY
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype3
(
internal
class
MsgElemInfoServtype3
(
@ProtoId
(
1
)
@JvmField
val
flashTroopPic
:
ImMsgBody
.
CustomFace
?
=
null
,
@ProtoId
(
1
)
@JvmField
val
flashTroopPic
:
ImMsgBody
.
CustomFace
?
=
null
,
@ProtoId
(
2
)
@JvmField
val
flashC2cPic
:
ImMsgBody
.
NotOnlineImage
?
=
null
@ProtoId
(
2
)
@JvmField
val
flashC2cPic
:
ImMsgBody
.
NotOnlineImage
?
=
null
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype31
(
internal
class
MsgElemInfoServtype31
(
@ProtoId
(
1
)
@JvmField
val
text
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
1
)
@JvmField
val
text
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
ext
:
ByteArray
=
EMPTY_BYTE_ARRAY
@ProtoId
(
2
)
@JvmField
val
ext
:
ByteArray
=
EMPTY_BYTE_ARRAY
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype4
(
internal
class
MsgElemInfoServtype4
(
@ProtoId
(
1
)
@JvmField
val
imsgType
:
Int
=
0
,
@ProtoId
(
1
)
@JvmField
val
imsgType
:
Int
=
0
,
@ProtoId
(
4
)
@JvmField
val
stStoryAioObjMsg
:
HummerCommelem
.
StoryAioObjMsg
?
=
null
@ProtoId
(
4
)
@JvmField
val
stStoryAioObjMsg
:
StoryAioObjMsg
?
=
null
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype5
(
internal
class
MsgElemInfoServtype5
(
@ProtoId
(
1
)
@JvmField
val
vid
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
1
)
@JvmField
val
vid
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
cover
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
cover
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
title
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
title
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
...
@@ -252,12 +252,12 @@ internal class MsgElemInfoServtype5(
...
@@ -252,12 +252,12 @@ internal class MsgElemInfoServtype5(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype8
(
internal
class
MsgElemInfoServtype8
(
@ProtoId
(
1
)
@JvmField
val
wifiDeliverGiftMsg
:
ImMsgBody
.
DeliverGiftMsg
?
=
null
@ProtoId
(
1
)
@JvmField
val
wifiDeliverGiftMsg
:
ImMsgBody
.
DeliverGiftMsg
?
=
null
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
MsgElemInfoServtype9
(
internal
class
MsgElemInfoServtype9
(
@ProtoId
(
1
)
@JvmField
val
anchorStatus
:
Int
=
0
,
@ProtoId
(
1
)
@JvmField
val
anchorStatus
:
Int
=
0
,
@ProtoId
(
2
)
@JvmField
val
jumpSchema
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
2
)
@JvmField
val
jumpSchema
:
ByteArray
=
EMPTY_BYTE_ARRAY
,
@ProtoId
(
3
)
@JvmField
val
anchorNickname
:
String
=
""
,
@ProtoId
(
3
)
@JvmField
val
anchorNickname
:
String
=
""
,
...
@@ -266,7 +266,7 @@ internal class MsgElemInfoServtype9(
...
@@ -266,7 +266,7 @@ internal class MsgElemInfoServtype9(
)
:
ProtoBuf
)
:
ProtoBuf
@Serializable
@Serializable
internal
class
StoryAioObjMsg
(
internal
class
StoryAioObjMsg
(
@ProtoId
(
1
)
@JvmField
val
uiUrl
:
String
=
""
,
@ProtoId
(
1
)
@JvmField
val
uiUrl
:
String
=
""
,
@ProtoId
(
2
)
@JvmField
val
jmpUrl
:
String
=
""
@ProtoId
(
2
)
@JvmField
val
jmpUrl
:
String
=
""
)
:
ProtoBuf
)
:
ProtoBuf
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/HummerMessage.kt
View file @
128125ee
...
@@ -46,9 +46,12 @@ sealed class HummerMessage : MessageContent {
...
@@ -46,9 +46,12 @@ sealed class HummerMessage : MessageContent {
@SinceMirai
(
"0.31.0"
)
@SinceMirai
(
"0.31.0"
)
@OptIn
(
MiraiInternalAPI
::
class
)
@OptIn
(
MiraiInternalAPI
::
class
)
data class
PokeMessage
internal
constructor
(
data class
PokeMessage
internal
constructor
(
@MiraiExperimentalAPI
(
"may change in future"
)
/**
* 仅 mirai, 显示的名称
*/
val
name
:
String
,
val
type
:
Int
,
val
type
:
Int
,
@MiraiExperimentalAPI
(
"may change in future"
)
val
id
:
Int
val
id
:
Int
)
:
HummerMessage
()
{
)
:
HummerMessage
()
{
@Suppress
(
"DEPRECATION_ERROR"
,
"DEPRECATION"
,
"INVISIBLE_MEMBER"
,
"INVISIBLE_REFERENCE"
)
@Suppress
(
"DEPRECATION_ERROR"
,
"DEPRECATION"
,
"INVISIBLE_MEMBER"
,
"INVISIBLE_REFERENCE"
)
...
@@ -58,27 +61,78 @@ data class PokeMessage internal constructor(
...
@@ -58,27 +61,78 @@ data class PokeMessage internal constructor(
/** 戳一戳 */
/** 戳一戳 */
@JvmField
@JvmField
val
Poke
=
PokeMessage
(
1
,
-
1
)
val
Poke
=
PokeMessage
(
"戳一戳"
,
1
,
-
1
)
/** 比心 */
/** 比心 */
@JvmField
@JvmField
val
ShowLove
=
PokeMessage
(
2
,
-
1
)
val
ShowLove
=
PokeMessage
(
"比心"
,
2
,
-
1
)
/** 点赞 */
/** 点赞 */
@JvmField
@JvmField
val
Like
=
PokeMessage
(
3
,
-
1
)
val
Like
=
PokeMessage
(
"点赞"
,
3
,
-
1
)
/** 心碎 */
/** 心碎 */
@JvmField
@JvmField
val
Heartbroken
=
PokeMessage
(
4
,
-
1
)
val
Heartbroken
=
PokeMessage
(
"心碎"
,
4
,
-
1
)
/** 666 */
/** 666 */
@JvmField
@JvmField
val
SixSixSix
=
PokeMessage
(
5
,
-
1
)
val
SixSixSix
=
PokeMessage
(
"666"
,
5
,
-
1
)
/** 放大招 */
/** 放大招 */
@JvmField
@JvmField
val
FangDaZhao
=
PokeMessage
(
6
,
-
1
)
val
FangDaZhao
=
PokeMessage
(
"放大招"
,
6
,
-
1
)
/** 宝贝球 (SVIP) */
@JvmField
val
BaoBeiQiu
=
PokeMessage
(
"宝贝球"
,
126
,
2011
)
/** 玫瑰花 (SVIP) */
@JvmField
val
Rose
=
PokeMessage
(
"玫瑰花"
,
126
,
2007
)
/** 召唤术 (SVIP) */
@JvmField
val
ZhaoHuanShu
=
PokeMessage
(
"召唤术"
,
126
,
2006
)
/** 让你皮 (SVIP) */
@JvmField
val
RangNiPi
=
PokeMessage
(
"让你皮"
,
126
,
2009
)
/** 结印 (SVIP) */
@JvmField
val
JieYin
=
PokeMessage
(
"结印"
,
126
,
2005
)
/** 手雷 (SVIP) */
@JvmField
val
ShouLei
=
PokeMessage
(
"手雷"
,
126
,
2004
)
/** 勾引 */
@JvmField
val
GouYin
=
PokeMessage
(
"勾引"
,
126
,
2003
)
/** 抓一下 (SVIP) */
@JvmField
val
ZhuaYiXia
=
PokeMessage
(
"抓一下"
,
126
,
2001
)
/** 碎屏 (SVIP) */
@JvmField
val
SuiPing
=
PokeMessage
(
"碎屏"
,
126
,
2002
)
/** 敲门 (SVIP) */
@JvmField
val
QiaoMen
=
PokeMessage
(
"敲门"
,
126
,
2002
)
/**
* 所有类型数组
*/
@JvmStatic
val
values
:
Array
<
PokeMessage
>
=
arrayOf
(
Poke
,
ShowLove
,
Like
,
Heartbroken
,
SixSixSix
,
FangDaZhao
,
BaoBeiQiu
,
Rose
,
ZhaoHuanShu
,
RangNiPi
,
JieYin
,
ShouLei
,
GouYin
,
ZhuaYiXia
,
SuiPing
)
}
}
@OptIn
(
MiraiExperimentalAPI
::
class
)
@OptIn
(
MiraiExperimentalAPI
::
class
)
...
...
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