mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 09:50:16 +08:00
Better cast
This commit is contained in:
parent
eca68252a7
commit
f238f7d092
@ -73,8 +73,7 @@ internal object MemberJoinPacketHandler : KnownEventParserAndHandler<MemberJoinE
|
||||
|
||||
discardExact(1) // 01
|
||||
val qq = bot.getQQ(readQQ())
|
||||
val member = with(bot) {
|
||||
this as? TIMPCBot ?: error("wrong Bot type passed")
|
||||
val member = with(bot as? TIMPCBot ?: error("wrong Bot type passed")) {
|
||||
group.Member(qq, MemberPermission.MEMBER)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user