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
a30fafa8
Commit
a30fafa8
authored
Mar 22, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix binary compatibility
parent
d8e262c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt
...monMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt
+15
-6
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/subscribeMessages.kt
View file @
a30fafa8
...
...
@@ -32,6 +32,7 @@ import kotlin.coroutines.CoroutineContext
import
kotlin.coroutines.EmptyCoroutineContext
import
kotlin.js.JsName
import
kotlin.jvm.JvmName
import
kotlin.jvm.JvmSynthetic
typealias
MessagePacketSubscribersBuilder
=
MessageSubscribersBuilder
<
MessagePacket
<
*
,
*
>,
Listener
<
MessagePacket
<
*
,
*
>>,
Unit
,
Unit
>
...
...
@@ -315,17 +316,17 @@ open class MessageSubscribersBuilder<M : MessagePacket<*, *>, out Ret, R : RR, R
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
open
infix
fun
reply
(
toReply
:
String
):
Ret
{
internal
open
infix
fun
reply
(
toReply
:
String
):
Ret
{
return
content
(
filter
)
{
reply
(
toReply
);
stub
}
}
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
open
infix
fun
reply
(
message
:
Message
):
Ret
{
internal
open
infix
fun
reply
(
message
:
Message
):
Ret
{
return
content
(
filter
)
{
reply
(
message
);
stub
}
}
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
open
infix
fun
reply
(
replier
:
(
@MessageDsl
suspend
M
.(
String
)
->
Any
?)):
Ret
{
internal
open
infix
fun
reply
(
replier
:
(
@MessageDsl
suspend
M
.(
String
)
->
Any
?)):
Ret
{
return
content
(
filter
)
{
@Suppress
(
"DSL_SCOPE_VIOLATION_WARNING"
)
executeAndReply
(
replier
)
...
...
@@ -333,26 +334,34 @@ open class MessageSubscribersBuilder<M : MessagePacket<*, *>, out Ret, R : RR, R
}
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
open
infix
fun
quoteReply
(
toReply
:
String
):
Ret
{
internal
open
infix
fun
quoteReply
(
toReply
:
String
):
Ret
{
return
content
(
filter
)
{
quoteReply
(
toReply
);
stub
}
}
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
open
infix
fun
quoteReply
(
message
:
Message
):
Ret
{
internal
open
infix
fun
quoteReply
(
message
:
Message
):
Ret
{
return
content
(
filter
)
{
quoteReply
(
message
);
stub
}
}
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
open
infix
fun
quoteReply
(
replier
:
(
@MessageDsl
suspend
M
.(
String
)
->
Any
?)):
Ret
{
internal
open
infix
fun
quoteReply
(
replier
:
(
@MessageDsl
suspend
M
.(
String
)
->
Any
?)):
Ret
{
return
content
(
filter
)
{
@Suppress
(
"DSL_SCOPE_VIOLATION_WARNING"
)
executeAndQuoteReply
(
replier
)
}
}
@JvmSynthetic
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
@JvmName
(
"invoke"
)
internal
fun
invoke0
(
onEvent
:
MessageListener
<
M
,
R
>):
Listener
<
*
>
{
return
content
(
filter
,
onEvent
)
as
Listener
<
*
>
}
/**
* 启动事件监听.
*/
@JvmName
(
"invoke1"
)
// do not inline due to kotlin (1.3.61) bug: java.lang.IllegalAccessError
operator
fun
invoke
(
onEvent
:
MessageListener
<
M
,
R
>):
Ret
{
return
content
(
filter
,
onEvent
)
...
...
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