mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
fix #206
This commit is contained in:
parent
1935352ae6
commit
521f928926
@ -16,6 +16,7 @@ import net.mamoe.mirai.console.permission.AbstractPermitteeId.*
|
||||
|
||||
internal fun parseFromStringImpl(string: String): AbstractPermitteeId {
|
||||
val str = string.trim { it.isWhitespace() }.toLowerCase()
|
||||
if (str == "*") return AnyContact
|
||||
if (str == "console") return Console
|
||||
if (str.isNotEmpty()) {
|
||||
when (str[0]) {
|
||||
|
@ -266,13 +266,13 @@ public sealed class AbstractPermitteeId(
|
||||
/**
|
||||
* 表示唯一的一个好友
|
||||
*
|
||||
* - **直接父标识符**: [ExactUser]
|
||||
* - **直接父标识符**: [ExactUser], [AnyFriend]
|
||||
* - **间接父标识符**: [AnyUser], [AnyContact]
|
||||
* - 字符串表示: "f$id"
|
||||
*/
|
||||
public data class ExactFriend(
|
||||
public val id: Long,
|
||||
) : AbstractPermitteeId(ExactUser(id)) {
|
||||
) : AbstractPermitteeId(ExactUser(id), AnyFriend) {
|
||||
override fun asString(): String = "f$id"
|
||||
}
|
||||
|
||||
@ -304,7 +304,7 @@ public sealed class AbstractPermitteeId(
|
||||
* 表示唯一的一个 *在临时会话发送消息的* [群成员][Member]
|
||||
*
|
||||
* - **直接父标识符**: [ExactMember]
|
||||
* - **间接父标识符**: [AnyUser], [AnyMember], [ExactUser], [AnyContact]
|
||||
* - **间接父标识符**: [AnyUser], [AnyMember], [ExactUser], [AnyContact], [AnyMemberFromAnyGroup]
|
||||
* - 字符串表示: "t$groupId.$memberId"
|
||||
*/
|
||||
public data class ExactTemp(
|
||||
|
Loading…
Reference in New Issue
Block a user