mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-20 15:49:15 +08:00
Enhance MessageChainBuilder
This commit is contained in:
parent
0acb89cd36
commit
6311c39c97
@ -78,8 +78,14 @@ open class MessageChainBuilder private constructor(
|
||||
return addAll(elements.flatten())
|
||||
}
|
||||
|
||||
fun addAll(elements: Iterable<SingleMessage>): Boolean {
|
||||
checkBuilt()
|
||||
flushCache()
|
||||
return addAll(elements.flatten())
|
||||
}
|
||||
|
||||
@JvmName("addAllFlatten") // erased generic type cause declaration clash
|
||||
fun addAll(elements: Collection<Message>): Boolean {
|
||||
fun addAll(elements: Iterable<Message>): Boolean {
|
||||
checkBuilt()
|
||||
flushCache()
|
||||
return addAll(elements.flatten())
|
||||
|
Loading…
Reference in New Issue
Block a user