Specify maximum requirements

This commit is contained in:
Him188 2020-03-29 12:45:41 +08:00
parent 04b0287738
commit 8d2e818454

View File

@ -370,7 +370,7 @@ internal abstract class QQAndroidBotBase constructor(
@MiraiExperimentalAPI
override suspend fun _lowLevelSendLongMessage(groupCode: Long, message: Message) {
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 source = MessageSourceFromSendFriend(