mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-17 15:54:07 +08:00
Fix no such member
when kick
This commit is contained in:
parent
751d653545
commit
ecfcc183e1
@ -131,7 +131,7 @@ internal class OnlinePush {
|
||||
val groupUin = content.fromUin
|
||||
|
||||
bot.getGroupByUin(groupUin).let { group ->
|
||||
val member = group[target] as MemberImpl
|
||||
val member = group.getOrNull(target) as? MemberImpl ?: return NoPacket
|
||||
this.discardExact(1)
|
||||
return MemberLeaveEvent.Kick(member.also {
|
||||
group.members.delegate.remove(member)
|
||||
|
Loading…
Reference in New Issue
Block a user