Throw specific ISE when kicking members too fast, close #1503

This commit is contained in:
Him188 2021-11-26 18:03:51 +00:00
parent 8e8dd0e26b
commit ca80f5285f

View File

@ -177,6 +177,7 @@ internal class NormalMemberImpl constructor(
ban = block
).sendAndExpect()
if (response.ret == 255) error("Operation too fast") // https://github.com/mamoe/mirai/issues/1503
check(response.success) { "kick failed: ${response.ret}" }
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")