Throw a specific exception when reaching maximum AtAll times limit, fix #1201

This commit is contained in:
Him188 2021-11-26 17:31:21 +00:00
parent 30710e0b95
commit 64920a399e

View File

@ -173,6 +173,7 @@ internal abstract class SendMessageHandler<C : Contact> {
val contact = contact
when (resp.resultType) {
120 -> if (contact is Group) throw BotIsBeingMutedException(contact)
121 -> if (AtAll in finalMessage) throw IllegalStateException("Send message to $contact failed, reached maximum AtAll times limit.")
}
}
check(resp is MessageSvcPbSendMsg.Response.SUCCESS) {