mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 06:50:08 +08:00
Specify maximum requirements
This commit is contained in:
parent
04b0287738
commit
8d2e818454
@ -370,7 +370,7 @@ internal abstract class QQAndroidBotBase constructor(
|
|||||||
@MiraiExperimentalAPI
|
@MiraiExperimentalAPI
|
||||||
override suspend fun _lowLevelSendLongMessage(groupCode: Long, message: Message) {
|
override suspend fun _lowLevelSendLongMessage(groupCode: Long, message: Message) {
|
||||||
val chain = message.asMessageChain()
|
val chain = message.asMessageChain()
|
||||||
check(chain.toString().length <= 4500 && chain.count { it is Image } <= 50) { "message is too large" }
|
check(chain.toString().length <= 4500 && chain.count { it is Image } <= 50) { "message is too large. Allow up to 4500 chars or 50 images" }
|
||||||
val group = getGroup(groupCode)
|
val group = getGroup(groupCode)
|
||||||
|
|
||||||
val source = MessageSourceFromSendFriend(
|
val source = MessageSourceFromSendFriend(
|
||||||
|
Loading…
Reference in New Issue
Block a user