mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 22:30:47 +08:00
Handle mute result as an IllegalStateException
This commit is contained in:
parent
8d7e984b1c
commit
8f2843cbfa
@ -288,9 +288,12 @@ internal class GroupImpl(
|
|||||||
source = it
|
source = it
|
||||||
source.startWaitingSequenceId(this)
|
source.startWaitingSequenceId(this)
|
||||||
}.sendAndExpect()
|
}.sendAndExpect()
|
||||||
check(
|
if (response is MessageSvc.PbSendMsg.Response.Failed) {
|
||||||
response is MessageSvc.PbSendMsg.Response.SUCCESS
|
when (response.errorCode) {
|
||||||
) { "send message failed: $response" }
|
120 -> error("bot is being muted.")
|
||||||
|
else -> error("send message failed: $response")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return MessageReceipt(source, this, botAsMember)
|
return MessageReceipt(source, this, botAsMember)
|
||||||
|
Loading…
Reference in New Issue
Block a user