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
3cc5cbfc
Commit
3cc5cbfc
authored
Apr 04, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce `BotIsBeingMutedException` to replace `IllegalStateException`
parent
e8b0c990
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
101 additions
and
61 deletions
+101
-61
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/GroupImpl.kt
...ain/kotlin/net/mamoe/mirai/qqandroid/contact/GroupImpl.kt
+3
-3
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageSourceImpl.kt
...in/net/mamoe/mirai/qqandroid/message/MessageSourceImpl.kt
+2
-2
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/type.kt
...commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/type.kt
+1
-1
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Contact.kt
...src/androidMain/kotlin/net/mamoe/mirai/contact/Contact.kt
+1
-1
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/ContactJavaFriendlyAPI.kt
.../kotlin/net/mamoe/mirai/contact/ContactJavaFriendlyAPI.kt
+1
-1
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Group.kt
...e/src/androidMain/kotlin/net/mamoe/mirai/contact/Group.kt
+1
-1
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Member.kt
.../src/androidMain/kotlin/net/mamoe/mirai/contact/Member.kt
+1
-1
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/QQ.kt
...core/src/androidMain/kotlin/net/mamoe/mirai/contact/QQ.kt
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Contact.kt
.../src/commonMain/kotlin/net.mamoe.mirai/contact/Contact.kt
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/ContactList.kt
.../commonMain/kotlin/net.mamoe.mirai/contact/ContactList.kt
+63
-40
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt
...re/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Member.kt
...e/src/commonMain/kotlin/net.mamoe.mirai/contact/Member.kt
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/MessageTooLargeException.kt
...otlin/net.mamoe.mirai/contact/MessageTooLargeException.kt
+18
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt
...-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt
+1
-1
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Contact.kt
...ore/src/jvmMain/kotlin/net/mamoe/mirai/contact/Contact.kt
+1
-1
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/ContactJavaFriendlyAPI.kt
.../kotlin/net/mamoe/mirai/contact/ContactJavaFriendlyAPI.kt
+1
-1
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Group.kt
...-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Group.kt
+1
-1
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Member.kt
...core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Member.kt
+1
-1
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/QQ.kt
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/QQ.kt
+1
-1
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/contact/GroupImpl.kt
View file @
3cc5cbfc
...
...
@@ -259,16 +259,16 @@ internal class GroupImpl(
override
operator
fun
get
(
id
:
Long
):
Member
{
return
members
.
delegate
.
firstOrNull
{
it
.
id
==
id
}
return
members
.
firstOrNull
{
it
.
id
==
id
}
?:
throw
NoSuchElementException
(
"member $id not found in group $uin"
)
}
override
fun
contains
(
id
:
Long
):
Boolean
{
return
members
.
delegate
.
firstOrNull
{
it
.
id
==
id
}
!=
null
return
members
.
firstOrNull
{
it
.
id
==
id
}
!=
null
}
override
fun
getOrNull
(
id
:
Long
):
Member
?
{
return
members
.
delegate
.
firstOrNull
{
it
.
id
==
id
}
return
members
.
firstOrNull
{
it
.
id
==
id
}
}
@OptIn
(
MiraiExperimentalAPI
::
class
,
LowLevelAPI
::
class
)
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/message/MessageSourceImpl.kt
View file @
3cc5cbfc
...
...
@@ -81,7 +81,7 @@ internal class MessageSourceFromMsg(
}
else
toJceDataImplForGroup
()
}
val
elems
by
lazy
{
private
val
elems
by
lazy
{
delegate
.
msgBody
.
richText
.
elems
.
toMutableList
().
also
{
if
(
it
.
last
().
elemFlags2
==
null
)
it
.
add
(
ImMsgBody
.
Elem
(
elemFlags2
=
ImMsgBody
.
ElemFlags2
()))
}
...
...
@@ -256,7 +256,7 @@ internal class MessageSourceFromSendGroup(
override
val
groupId
:
Long
,
override
val
originalMessage
:
MessageChain
)
:
MessageSourceFromSend
()
{
internal
lateinit
var
sequenceIdDeferred
:
Deferred
<
Int
>
private
lateinit
var
sequenceIdDeferred
:
Deferred
<
Int
>
@OptIn
(
ExperimentalCoroutinesApi
::
class
)
override
val
id
:
Long
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/type.kt
View file @
3cc5cbfc
...
...
@@ -67,7 +67,7 @@ internal inline fun <T> Iterable<T>.sumUpTo(upTo: Int, selector: (T, remaining:
}
internal
inline
fun
CharSequence
.
sumUpTo
(
upTo
:
Int
,
selector
:
(
Char
)
->
Int
):
Int
{
var
sum
:
Int
=
0
var
sum
=
0
for
(
element
in
this
)
{
sum
+=
selector
(
element
)
if
(
sum
>=
upTo
)
{
...
...
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Contact.kt
View file @
3cc5cbfc
...
...
@@ -60,7 +60,7 @@ actual abstract class Contact : CoroutineScope, ContactJavaFriendlyAPI() {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可 [引用回复][MessageReceipt.quote](仅群聊)或 [撤回][MessageReceipt.recall] 这条消息.
...
...
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/ContactJavaFriendlyAPI.kt
View file @
3cc5cbfc
...
...
@@ -54,7 +54,7 @@ actual abstract class ContactJavaFriendlyAPI {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出 * @throws MessageTooLargeException 当消息过长时抛出
*
...
...
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Group.kt
View file @
3cc5cbfc
...
...
@@ -131,7 +131,7 @@ actual abstract class Group : Contact(), CoroutineScope {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可进行撤回 ([MessageReceipt.recall])
...
...
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/Member.kt
View file @
3cc5cbfc
...
...
@@ -116,7 +116,7 @@ actual abstract class Member : MemberJavaFriendlyAPI() {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可进行撤回 ([MessageReceipt.recall])
...
...
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/contact/QQ.kt
View file @
3cc5cbfc
...
...
@@ -84,7 +84,7 @@ actual abstract class QQ : Contact(), CoroutineScope {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可进行撤回 ([MessageReceipt.recall])
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Contact.kt
View file @
3cc5cbfc
...
...
@@ -63,7 +63,7 @@ expect abstract class Contact() : CoroutineScope, ContactJavaFriendlyAPI {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可 [引用回复][MessageReceipt.quote](仅群聊)或 [撤回][MessageReceipt.recall] 这条消息.
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/ContactList.kt
View file @
3cc5cbfc
...
...
@@ -7,11 +7,12 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
Suppress
(
"EXPERIMENTAL_API_USAGE"
)
@
file
:
Suppress
(
"EXPERIMENTAL_API_USAGE"
,
"unused"
)
package
net.mamoe.mirai.contact
import
net.mamoe.mirai.utils.*
import
kotlin.jvm.JvmName
/**
...
...
@@ -21,17 +22,8 @@ import net.mamoe.mirai.utils.*
*/
@OptIn
(
MiraiInternalAPI
::
class
)
@Suppress
(
"unused"
)
class
ContactList
<
C
:
Contact
>(
@MiraiInternalAPI
val
delegate
:
LockFreeLinkedList
<
C
>)
{
/**
* ID 列表的字符串表示.
* 如:
* ```
* [123456, 321654, 123654]
* ```
*/
val
idContentString
:
String
get
()
=
"["
+
buildString
{
delegate
.
forEach
{
append
(
it
.
id
).
append
(
", "
)
}
}.
dropLast
(
2
)
+
"]"
operator
fun
get
(
id
:
Long
):
C
=
delegate
[
id
]
class
ContactList
<
C
:
Contact
>(
@MiraiInternalAPI
val
delegate
:
LockFreeLinkedList
<
C
>)
:
Iterable
<
C
>
{
operator
fun
get
(
id
:
Long
):
C
=
delegate
.
asSequence
().
first
{
it
.
id
==
id
}
fun
getOrNull
(
id
:
Long
):
C
?
=
delegate
.
getOrNull
(
id
)
val
size
:
Int
get
()
=
delegate
.
size
...
...
@@ -39,21 +31,53 @@ class ContactList<C : Contact>(@MiraiInternalAPI val delegate: LockFreeLinkedLis
operator
fun
contains
(
id
:
Long
):
Boolean
=
delegate
.
getOrNull
(
id
)
!=
null
fun
containsAll
(
elements
:
Collection
<
C
>):
Boolean
=
elements
.
all
{
contains
(
it
)
}
fun
isEmpty
():
Boolean
=
delegate
.
isEmpty
()
override
fun
toString
():
String
=
delegate
.
asSequence
().
joinToString
(
separator
=
", "
,
prefix
=
"ContactList("
,
postfix
=
")"
)
override
fun
iterator
():
Iterator
<
C
>
{
return
this
.
delegate
.
asSequence
().
iterator
()
}
@PlannedRemoval
(
"1.0.0"
)
@Suppress
(
"PropertyName"
)
@
get
:
JvmName
(
"getIdContentString"
)
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
val
_idContentString
:
String
get
()
=
this
.
idContentString
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
inline
fun
forEach
(
block
:
(
C
)
->
Unit
)
=
delegate
.
forEach
(
block
)
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
fun
first
():
C
{
forEach
{
return
it
}
throw
NoSuchElementException
()
}
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"for binary compatibility"
,
level
=
DeprecationLevel
.
HIDDEN
)
fun
firstOrNull
():
C
?
{
forEach
{
return
it
}
return
null
}
override
fun
toString
():
String
=
delegate
.
asSequence
().
joinToString
(
separator
=
", "
,
prefix
=
"ContactList("
,
postfix
=
")"
)
}
/**
* ID 列表的字符串表示.
* 如:
* ```
* [123456, 321654, 123654]
* ```
*/
val
ContactList
<*>.
idContentString
:
String
get
()
=
"["
+
@OptIn
(
MiraiInternalAPI
::
class
)
buildString
{
delegate
.
forEach
{
append
(
it
.
id
).
append
(
", "
)
}
}.
dropLast
(
2
)
+
"]"
operator
fun
<
C
:
Contact
>
LockFreeLinkedList
<
C
>.
get
(
id
:
Long
):
C
{
forEach
{
if
(
it
.
id
==
id
)
return
it
}
throw
NoSuchElementException
(
"No such contact: $id"
)
...
...
@@ -64,46 +88,45 @@ fun <C : Contact> LockFreeLinkedList<C>.getOrNull(id: Long): C? {
return
null
}
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"use firstOrNull from stdlib"
,
replaceWith
=
ReplaceWith
(
"this.asSequence().firstOrNull(filter)"
),
level
=
DeprecationLevel
.
ERROR
)
inline
fun
<
C
:
Contact
>
LockFreeLinkedList
<
C
>.
firstOrNull
(
filter
:
(
C
)
->
Boolean
):
C
?
{
forEach
{
if
(
filter
(
it
))
return
it
}
return
null
}
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"use firstOrNull"
,
replaceWith
=
ReplaceWith
(
"firstOrNull(filter)"
),
level
=
DeprecationLevel
.
ERROR
)
inline
fun
<
C
:
Contact
>
LockFreeLinkedList
<
C
>.
filteringGetOrNull
(
filter
:
(
C
)
->
Boolean
):
C
?
{
return
this
.
firstOrNull
(
filter
)
}
@Deprecated
(
"use firstOrNull from stdlib"
,
replaceWith
=
ReplaceWith
(
"firstOrNull(filter)"
),
level
=
DeprecationLevel
.
ERROR
)
inline
fun
<
C
:
Contact
>
LockFreeLinkedList
<
C
>.
filteringGetOrNull
(
filter
:
(
C
)
->
Boolean
):
C
?
=
this
.
asSequence
().
firstOrNull
(
filter
)
/**
* Collect all the elements into a [MutableList] then cast it as a [List]
*/
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"use Iterator.toList from stdlib"
,
level
=
DeprecationLevel
.
HIDDEN
)
fun
<
E
:
Contact
>
ContactList
<
E
>.
toList
():
List
<
E
>
=
toMutableList
()
/**
* Collect all the elements into a [MutableList].
*/
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"use Iterator.toMutableList from stdlib"
,
level
=
DeprecationLevel
.
HIDDEN
)
@OptIn
(
MiraiInternalAPI
::
class
)
fun
<
E
:
Contact
>
ContactList
<
E
>.
toMutableList
():
MutableList
<
E
>
=
this
.
delegate
.
toMutableList
()
/**
* Collect all the elements into a [MutableSet] then cast it as a [Set]
*/
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"use Iterator.toSet from stdlib"
,
level
=
DeprecationLevel
.
HIDDEN
)
fun
<
E
:
Contact
>
ContactList
<
E
>.
toSet
():
Set
<
E
>
=
toMutableSet
()
/**
* Collect all the elements into a [MutableSet].
*/
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"use Iterator.toMutableSet from stdlib"
,
level
=
DeprecationLevel
.
HIDDEN
)
@OptIn
(
MiraiInternalAPI
::
class
)
fun
<
E
:
Contact
>
ContactList
<
E
>.
toMutableSet
():
MutableSet
<
E
>
=
this
.
delegate
.
toMutableSet
()
/**
* Builds a [Sequence] containing all the elements in [this] in the same order.
*
* Note that the sequence is dynamic, that is, elements are yielded atomically only when it is required
*/
@PlannedRemoval
(
"1.0.0"
)
@Deprecated
(
"use Iterator.asSequence from stdlib"
,
level
=
DeprecationLevel
.
HIDDEN
)
@OptIn
(
MiraiInternalAPI
::
class
)
fun
<
E
:
Contact
>
ContactList
<
E
>.
asSequence
():
Sequence
<
E
>
{
return
this
.
delegate
.
asSequence
()
}
\ No newline at end of file
fun
<
E
:
Contact
>
ContactList
<
E
>.
asSequence
():
Sequence
<
E
>
=
this
.
delegate
.
asSequence
()
\ No newline at end of file
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Group.kt
View file @
3cc5cbfc
...
...
@@ -135,7 +135,7 @@ expect abstract class Group() : Contact, CoroutineScope {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可进行撤回 ([MessageReceipt.recall])
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Member.kt
View file @
3cc5cbfc
...
...
@@ -138,7 +138,7 @@ expect abstract class Member() : MemberJavaFriendlyAPI {
* @see MessageSendEvent.GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可进行撤回 ([MessageReceipt.recall])
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/MessageTooLargeException.kt
View file @
3cc5cbfc
...
...
@@ -16,6 +16,8 @@ import net.mamoe.mirai.utils.SinceMirai
/**
* 发送消息时消息过长抛出的异常.
*
* @see Contact.sendMessage
*/
@SinceMirai
(
"0.32.0"
)
class
MessageTooLargeException
(
...
...
@@ -29,4 +31,19 @@ class MessageTooLargeException(
*/
val
messageAfterEvent
:
Message
,
exceptionMessage
:
String
)
:
RuntimeException
(
exceptionMessage
)
\ No newline at end of file
)
:
RuntimeException
(
exceptionMessage
)
/**
* 发送消息时 bot 正处于被禁言状态时抛出的异常.
*
* @see Group.sendMessage
*/
@SinceMirai
(
"0.33.0"
)
class
BotIsBeingMutedException
(
val
target
:
Group
,
/**
* 被禁言剩余时间
* @see Group.botMuteRemaining
*/
val
remainingMillis
:
Int
)
:
RuntimeException
()
\ No newline at end of file
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt
View file @
3cc5cbfc
...
...
@@ -93,7 +93,7 @@ expect abstract class QQ() : Contact, CoroutineScope {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可进行撤回 ([MessageReceipt.recall])
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Contact.kt
View file @
3cc5cbfc
...
...
@@ -59,7 +59,7 @@ actual abstract class Contact : CoroutineScope, ContactJavaFriendlyAPI() {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可 [引用回复][MessageReceipt.quote](仅群聊)或 [撤回][MessageReceipt.recall] 这条消息.
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/ContactJavaFriendlyAPI.kt
View file @
3cc5cbfc
...
...
@@ -54,7 +54,7 @@ actual abstract class ContactJavaFriendlyAPI {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可 [引用回复][MessageReceipt.quote](仅群聊)或 [撤回][MessageReceipt.recall] 这条消息.
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Group.kt
View file @
3cc5cbfc
...
...
@@ -133,7 +133,7 @@ actual abstract class Group : Contact(), CoroutineScope {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可进行撤回 ([MessageReceipt.recall])
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/Member.kt
View file @
3cc5cbfc
...
...
@@ -124,7 +124,7 @@ actual abstract class Member : MemberJavaFriendlyAPI() {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可进行撤回 ([MessageReceipt.recall])
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/contact/QQ.kt
View file @
3cc5cbfc
...
...
@@ -84,7 +84,7 @@ actual abstract class QQ : Contact(), CoroutineScope {
* @see GroupMessageSendEvent 发送群消息事件. cancellable
*
* @throws EventCancelledException 当发送消息事件被取消时抛出
* @throws
IllegalState
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws
BotIsBeingMuted
Exception 发送群消息时若 [Bot] 被禁言抛出
* @throws MessageTooLargeException 当消息过长时抛出
*
* @return 消息回执. 可进行撤回 ([MessageReceipt.recall])
...
...
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