mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-12 14:00:12 +08:00
Throw a specific exception when reaching maximum AtAll times limit, fix #1201
This commit is contained in:
parent
30710e0b95
commit
64920a399e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user