mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Fix ExactMember, ExactTemp
This commit is contained in:
parent
5c2a9a9553
commit
60e13e73e9
@ -636,7 +636,7 @@ public open class MemberCommandSender internal constructor(
|
||||
public override fun toString(): String = "MemberCommandSender($user)"
|
||||
|
||||
@ExperimentalPermission
|
||||
public override val identifier: PermissibleIdentifier = AbstractPermissibleIdentifier.ExactMember(user.id, group.id)
|
||||
public override val identifier: PermissibleIdentifier = AbstractPermissibleIdentifier.ExactMember(group.id, user.id)
|
||||
|
||||
@JvmBlockingBridge
|
||||
public override suspend fun sendMessage(message: String): MessageReceipt<Group> = sendMessage(PlainText(message))
|
||||
@ -659,7 +659,8 @@ public open class TempCommandSender internal constructor(
|
||||
public override fun toString(): String = "TempCommandSender($user)"
|
||||
|
||||
@ExperimentalPermission
|
||||
override val identifier: PermissibleIdentifier = AbstractPermissibleIdentifier.ExactTemp(user.id)
|
||||
public override val identifier: PermissibleIdentifier =
|
||||
AbstractPermissibleIdentifier.ExactTemp(user.group.id, user.id)
|
||||
|
||||
@JvmBlockingBridge
|
||||
public override suspend fun sendMessage(message: String): MessageReceipt<Member> = sendMessage(PlainText(message))
|
||||
|
@ -71,8 +71,9 @@ public sealed class AbstractPermissibleIdentifier(
|
||||
|
||||
public object AnyTemp : AbstractPermissibleIdentifier(AnyUser)
|
||||
public data class ExactTemp(
|
||||
public val groupId: Long,
|
||||
public val id: Long
|
||||
) : AbstractPermissibleIdentifier(ExactUser(id))
|
||||
) : AbstractPermissibleIdentifier(ExactUser(groupId)) // TODO: 2020/9/8 ExactMember ?
|
||||
|
||||
public object AnyUser : AbstractPermissibleIdentifier(AnyContact)
|
||||
public data class ExactUser(
|
||||
|
Loading…
Reference in New Issue
Block a user