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
9faea0a3
Commit
9faea0a3
authored
Mar 01, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `MessageRecallEvent.FriendRecall`
parent
3d6fe5a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
...mmonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
+24
-0
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
View file @
9faea0a3
...
@@ -114,6 +114,22 @@ sealed class MessageRecallEvent : BotEvent {
...
@@ -114,6 +114,22 @@ sealed class MessageRecallEvent : BotEvent {
*/
*/
abstract
val
messageTime
:
Int
// seconds
abstract
val
messageTime
:
Int
// seconds
/**
* 好友消息撤回事件, 暂不支持解析.
*/
data class
FriendRecall
(
override
val
bot
:
Bot
,
override
val
messageId
:
Long
,
override
val
messageTime
:
Int
,
/**
* 撤回操作人, 可能为 [Bot.uin] 或好友的 [QQ.id]
*/
val
operator
:
Long
)
:
MessageRecallEvent
(),
Packet
{
override
val
authorId
:
Long
get
()
=
bot
.
uin
}
data class
GroupRecall
(
data class
GroupRecall
(
override
val
bot
:
Bot
,
override
val
bot
:
Bot
,
override
val
authorId
:
Long
,
override
val
authorId
:
Long
,
...
@@ -131,6 +147,14 @@ sealed class MessageRecallEvent : BotEvent {
...
@@ -131,6 +147,14 @@ sealed class MessageRecallEvent : BotEvent {
val
MessageRecallEvent
.
GroupRecall
.
author
:
Member
val
MessageRecallEvent
.
GroupRecall
.
author
:
Member
get
()
=
if
(
authorId
==
bot
.
uin
)
group
.
botAsMember
else
group
[
authorId
]
get
()
=
if
(
authorId
==
bot
.
uin
)
group
.
botAsMember
else
group
[
authorId
]
val
MessageRecallEvent
.
FriendRecall
.
isByBot
:
Boolean
get
()
=
this
.
operator
==
bot
.
uin
val
MessageRecallEvent
.
isByBot
:
Boolean
get
()
=
when
(
this
)
{
is
MessageRecallEvent
.
FriendRecall
->
this
.
isByBot
is
MessageRecallEvent
.
GroupRecall
->
(
this
as
GroupOperableEvent
).
isByBot
}
// endregion
// endregion
// region 图片
// region 图片
...
...
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