mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-05 07:30:09 +08:00
Add check: ForwardMessage.nodeList mustn't be empty
This commit is contained in:
parent
6a631418d2
commit
48362a241c
@ -84,6 +84,12 @@ class ForwardMessage @JvmOverloads constructor(
|
||||
val nodeList: Collection<INode>,
|
||||
val displayStrategy: DisplayStrategy = DisplayStrategy
|
||||
) : MessageContent {
|
||||
init {
|
||||
require(nodeList.isNotEmpty()) {
|
||||
"Forward nodeList mustn't be empty"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ForwardMessage
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user