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
5ceaebca
Commit
5ceaebca
authored
Nov 28, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unexpected default value
parent
194a2437
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/event/BeingKickEvent.kt
...mirai/network/protocol/tim/packet/event/BeingKickEvent.kt
+3
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/event/Message.kt
....mamoe.mirai/network/protocol/tim/packet/event/Message.kt
+4
-7
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/event/BeingKickEvent.kt
View file @
5ceaebca
...
...
@@ -16,6 +16,9 @@ import net.mamoe.mirai.network.protocol.tim.packet.PacketVersion
*/
data class
BeingKickEvent
(
val
group
:
Group
,
val
operator
:
Member
)
:
EventPacket
/**
* 机器人被踢出去群
*/
object
BeingKickEventPacketHandler
:
KnownEventParserAndHandler
<
BeingKickEvent
>(
0
x0022u
)
{
//00 00 00 08 00 0A 00 04 01 00 00
// 00 36 DD C4 A0
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/event/Message.kt
View file @
5ceaebca
...
...
@@ -3,6 +3,7 @@
package
net.mamoe.mirai.network.protocol.tim.packet.event
import
kotlinx.io.core.ByteReadPacket
import
kotlinx.io.core.String
import
kotlinx.io.core.discardExact
import
kotlinx.io.core.readUInt
import
net.mamoe.mirai.Bot
...
...
@@ -32,10 +33,6 @@ import kotlin.jvm.JvmName
@UseExperimental
(
MiraiInternalAPI
::
class
)
expect
abstract
class
MessagePacket
<
TSubject
:
Contact
>()
:
MessagePacketBase
<
TSubject
>
interface
BotExtensions
{
suspend
fun
MessageChain
.
reply
()
}
@MiraiInternalAPI
abstract
class
MessagePacketBase
<
TSubject
:
Contact
>
:
EventPacket
,
BotEvent
()
{
internal
lateinit
var
botVar
:
Bot
...
...
@@ -109,7 +106,7 @@ data class GroupMessage(
*/
val
permission
:
MemberPermission
,
override
val
sender
:
QQ
,
override
val
message
:
MessageChain
=
NullMessageChain
override
val
message
:
MessageChain
)
:
MessagePacket
<
Group
>()
{
override
val
subject
:
Group
get
()
=
group
...
...
@@ -146,8 +143,8 @@ object GroupMessageEventParserAndHandler : KnownEventParserAndHandler<GroupMessa
}
senderName
=
when
{
tlv
.
containsKey
(
0
x01u
)
->
kotlinx
.
io
.
core
.
String
(
tlv
.
getValue
(
0
x01u
))
//这个人的qq昵称
tlv
.
containsKey
(
0
x02u
)
->
kotlinx
.
io
.
core
.
String
(
tlv
.
getValue
(
0
x02u
))
//这个人的群名片
tlv
.
containsKey
(
0
x01u
)
->
String
(
tlv
.
getValue
(
0
x01u
))
//这个人的qq昵称
tlv
.
containsKey
(
0
x02u
)
->
String
(
tlv
.
getValue
(
0
x02u
))
//这个人的群名片
else
->
{
tlv
.
printTLVMap
(
"TLV(tag=18) Map"
)
MiraiLogger
.
warning
(
"Could not determine senderName"
)
...
...
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