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
fc8714de
Commit
fc8714de
authored
Apr 08, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build
parent
3fdb6466
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
29 deletions
+16
-29
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
...mmonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
+6
-4
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt
...ore/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt
+10
-25
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/events/BotEvents.kt
View file @
fc8714de
...
...
@@ -12,8 +12,6 @@
package
net.mamoe.mirai.event.events
import
kotlinx.atomicfu.AtomicBoolean
import
kotlinx.atomicfu.atomic
import
net.mamoe.mirai.Bot
import
net.mamoe.mirai.JavaFriendlyAPI
import
net.mamoe.mirai.contact.*
...
...
@@ -22,6 +20,7 @@ import net.mamoe.mirai.event.BroadcastControllable
import
net.mamoe.mirai.event.CancellableEvent
import
net.mamoe.mirai.event.events.ImageUploadEvent.Failed
import
net.mamoe.mirai.event.events.ImageUploadEvent.Succeed
import
net.mamoe.mirai.event.internal.MiraiAtomicBoolean
import
net.mamoe.mirai.message.data.Image
import
net.mamoe.mirai.message.data.MessageChain
import
net.mamoe.mirai.message.data.MessageSource
...
...
@@ -31,6 +30,7 @@ import net.mamoe.mirai.utils.MiraiExperimentalAPI
import
net.mamoe.mirai.utils.MiraiInternalAPI
import
net.mamoe.mirai.utils.SinceMirai
import
net.mamoe.mirai.utils.internal.runBlocking
import
kotlin.jvm.JvmField
import
kotlin.jvm.JvmName
import
kotlin.jvm.JvmOverloads
import
kotlin.jvm.JvmSynthetic
...
...
@@ -511,7 +511,8 @@ data class NewFriendRequestEvent(
*/
val
fromNick
:
String
)
:
BotEvent
,
Packet
{
internal
val
responded
:
AtomicBoolean
=
atomic
(
false
)
@JvmField
internal
val
responded
:
MiraiAtomicBoolean
=
MiraiAtomicBoolean
(
false
)
/**
* @return 申请人来自的群. 当申请人来自其他途径申请时为 `null`
...
...
@@ -563,7 +564,8 @@ data class MemberJoinRequestEvent(
)
:
BotEvent
,
Packet
{
val
group
:
Group
=
this
.
bot
.
getGroup
(
groupId
)
internal
val
responded
:
AtomicBoolean
=
atomic
(
false
)
@JvmField
internal
val
responded
:
MiraiAtomicBoolean
=
MiraiAtomicBoolean
(
false
)
@JvmSynthetic
suspend
fun
accept
()
=
bot
.
acceptMemberJoinRequest
(
this
)
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/event/select.kt
View file @
fc8714de
...
...
@@ -119,6 +119,7 @@ suspend inline fun <reified T : ContactMessage, R> T.selectMessages(
*
* @see MessageSelectBuilderUnit 查看上层 API
*/
@Suppress
(
"PARAMETER_NAME_CHANGED_ON_OVERRIDE"
)
@SinceMirai
(
"0.29.0"
)
abstract
class
MessageSelectBuilder
<
M
:
ContactMessage
,
R
>
@PublishedApi
internal
constructor
(
ownerMessagePacket
:
M
,
...
...
@@ -148,24 +149,16 @@ abstract class MessageSelectBuilder<M : ContactMessage, R> @PublishedApi interna
@JvmName
(
"reply3"
)
@Suppress
(
"INAPPLICABLE_JVM_NAME"
,
"unused"
,
"UNCHECKED_CAST"
,
"INVALID_CHARACTERS"
,
"NAME_CONTAINS_ILLEGAL_CHARS"
,
"FunctionName"
"INAPPLICABLE_JVM_NAME"
,
"unused"
,
"UNCHECKED_CAST"
,
"INVALID_CHARACTERS"
,
"NAME_CONTAINS_ILLEGAL_CHARS"
,
"FunctionName"
)
@Deprecated
(
"Using `reply` DSL in message selection is prohibited"
,
level
=
DeprecationLevel
.
HIDDEN
)
override
infix
fun
MessageSelectionTimeoutChecker
.
`->`(
message
:
String
):
Nothing
=
error
(
"prohibited"
)
@JvmName
(
"reply3"
)
@Suppress
(
"INAPPLICABLE_JVM_NAME"
,
"unused"
,
"UNCHECKED_CAST"
,
"INVALID_CHARACTERS"
,
"NAME_CONTAINS_ILLEGAL_CHARS"
,
"FunctionName"
"INAPPLICABLE_JVM_NAME"
,
"unused"
,
"UNCHECKED_CAST"
,
"INVALID_CHARACTERS"
,
"NAME_CONTAINS_ILLEGAL_CHARS"
,
"FunctionName"
)
@Deprecated
(
"Using `reply` DSL in message selection is prohibited"
,
level
=
DeprecationLevel
.
HIDDEN
)
override
infix
fun
MessageSelectionTimeoutChecker
.
`->`(
message
:
Message
):
Nothing
=
error
(
"prohibited"
)
...
...
@@ -232,7 +225,7 @@ abstract class MessageSelectBuilder<M : ContactMessage, R> @PublishedApi interna
override
fun
ListeningFilter
.
quoteReply
(
toReply
:
String
)
=
error
(
"prohibited"
)
@Deprecated
(
"Using `reply` DSL in message selection is prohibited"
,
level
=
DeprecationLevel
.
HIDDEN
)
override
fun
ListeningFilter
.
quoteReply
(
message
:
Message
)
=
error
(
"prohibited"
)
override
fun
ListeningFilter
.
quoteReply
(
toReply
:
Message
)
=
error
(
"prohibited"
)
@Deprecated
(
"Using `reply` DSL in message selection is prohibited"
,
level
=
DeprecationLevel
.
HIDDEN
)
override
fun
ListeningFilter
.
quoteReply
(
replier
:
suspend
M
.(
String
)
->
Any
?)
=
error
(
"prohibited"
)
...
...
@@ -351,12 +344,8 @@ abstract class MessageSelectBuilderUnit<M : ContactMessage, R> @PublishedApi int
@JvmName
(
"reply3"
)
@Suppress
(
"INAPPLICABLE_JVM_NAME"
,
"unused"
,
"UNCHECKED_CAST"
,
"INVALID_CHARACTERS"
,
"NAME_CONTAINS_ILLEGAL_CHARS"
,
"FunctionName"
"INAPPLICABLE_JVM_NAME"
,
"unused"
,
"UNCHECKED_CAST"
,
"INVALID_CHARACTERS"
,
"NAME_CONTAINS_ILLEGAL_CHARS"
,
"FunctionName"
)
open
infix
fun
MessageSelectionTimeoutChecker
.
`->`(
message
:
Message
)
{
return
this
.
reply
(
message
)
...
...
@@ -364,12 +353,8 @@ abstract class MessageSelectBuilderUnit<M : ContactMessage, R> @PublishedApi int
@JvmName
(
"reply3"
)
@Suppress
(
"INAPPLICABLE_JVM_NAME"
,
"unused"
,
"UNCHECKED_CAST"
,
"INVALID_CHARACTERS"
,
"NAME_CONTAINS_ILLEGAL_CHARS"
,
"FunctionName"
"INAPPLICABLE_JVM_NAME"
,
"unused"
,
"UNCHECKED_CAST"
,
"INVALID_CHARACTERS"
,
"NAME_CONTAINS_ILLEGAL_CHARS"
,
"FunctionName"
)
open
infix
fun
MessageSelectionTimeoutChecker
.
`->`(
message
:
String
)
{
return
this
.
reply
(
message
)
...
...
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