mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-10 04:00:08 +08:00
Throw BotIsBeingMutedException on errorCode 120 when sending message
This commit is contained in:
parent
a06189d835
commit
ad04cd35a4
@ -149,6 +149,12 @@ internal abstract class SendMessageHandler<C : Contact> {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (resp is MessageSvcPbSendMsg.Response.Failed) {
|
||||
val contact = contact
|
||||
when (resp.errorCode) {
|
||||
120 -> if (contact is Group) throw BotIsBeingMutedException(contact)
|
||||
}
|
||||
}
|
||||
check(resp is MessageSvcPbSendMsg.Response.SUCCESS) {
|
||||
"Send group message failed: $resp"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user