mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-05 07:30:09 +08:00
Remove redundant overrides for contacts
This commit is contained in:
parent
a14531f696
commit
03a6596553
@ -19,13 +19,11 @@ public abstract interface class net/mamoe/mirai/Bot : kotlinx/coroutines/Corouti
|
||||
public fun getGroup (J)Lnet/mamoe/mirai/contact/Group;
|
||||
public fun getGroupOrFail (J)Lnet/mamoe/mirai/contact/Group;
|
||||
public abstract fun getGroups ()Lnet/mamoe/mirai/contact/ContactList;
|
||||
public abstract fun getId ()J
|
||||
public static fun getInstance (J)Lnet/mamoe/mirai/Bot;
|
||||
public static fun getInstanceOrNull (J)Lnet/mamoe/mirai/Bot;
|
||||
public static fun getInstances ()Ljava/util/List;
|
||||
public static fun getInstancesSequence ()Lkotlin/sequences/Sequence;
|
||||
public abstract fun getLogger ()Lnet/mamoe/mirai/utils/MiraiLogger;
|
||||
public abstract fun getNick ()Ljava/lang/String;
|
||||
public abstract fun getOtherClients ()Lnet/mamoe/mirai/contact/ContactList;
|
||||
public fun getStranger (J)Lnet/mamoe/mirai/contact/Stranger;
|
||||
public fun getStrangerOrFail (J)Lnet/mamoe/mirai/contact/Stranger;
|
||||
@ -331,9 +329,6 @@ public abstract interface class net/mamoe/mirai/contact/FileSupported : net/mamo
|
||||
public abstract interface class net/mamoe/mirai/contact/Friend : kotlinx/coroutines/CoroutineScope, net/mamoe/mirai/contact/User, net/mamoe/mirai/contact/VoiceSupported {
|
||||
public fun delete ()V
|
||||
public abstract fun delete (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public abstract fun getId ()J
|
||||
public abstract fun getNick ()Ljava/lang/String;
|
||||
public abstract fun getRemark ()Ljava/lang/String;
|
||||
public fun nudge ()Lnet/mamoe/mirai/message/action/FriendNudge;
|
||||
public synthetic fun nudge ()Lnet/mamoe/mirai/message/action/Nudge;
|
||||
public synthetic fun nudge ()Lnet/mamoe/mirai/message/action/UserNudge;
|
||||
@ -526,8 +521,6 @@ public final class net/mamoe/mirai/contact/Platform$Companion {
|
||||
public abstract interface class net/mamoe/mirai/contact/Stranger : kotlinx/coroutines/CoroutineScope, net/mamoe/mirai/contact/User {
|
||||
public fun delete ()V
|
||||
public abstract fun delete (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public abstract fun getId ()J
|
||||
public abstract fun getNick ()Ljava/lang/String;
|
||||
public synthetic fun nudge ()Lnet/mamoe/mirai/message/action/Nudge;
|
||||
public fun nudge ()Lnet/mamoe/mirai/message/action/StrangerNudge;
|
||||
public synthetic fun nudge ()Lnet/mamoe/mirai/message/action/UserNudge;
|
||||
@ -544,7 +537,6 @@ public final class net/mamoe/mirai/contact/StrangerKt {
|
||||
|
||||
public abstract interface class net/mamoe/mirai/contact/User : kotlinx/coroutines/CoroutineScope, net/mamoe/mirai/contact/Contact, net/mamoe/mirai/contact/UserOrBot {
|
||||
public abstract fun getId ()J
|
||||
public abstract fun getNick ()Ljava/lang/String;
|
||||
public abstract fun getRemark ()Ljava/lang/String;
|
||||
public abstract fun nudge ()Lnet/mamoe/mirai/message/action/UserNudge;
|
||||
public fun queryProfile ()Lnet/mamoe/mirai/data/UserProfile;
|
||||
|
@ -19,13 +19,11 @@ public abstract interface class net/mamoe/mirai/Bot : kotlinx/coroutines/Corouti
|
||||
public fun getGroup (J)Lnet/mamoe/mirai/contact/Group;
|
||||
public fun getGroupOrFail (J)Lnet/mamoe/mirai/contact/Group;
|
||||
public abstract fun getGroups ()Lnet/mamoe/mirai/contact/ContactList;
|
||||
public abstract fun getId ()J
|
||||
public static fun getInstance (J)Lnet/mamoe/mirai/Bot;
|
||||
public static fun getInstanceOrNull (J)Lnet/mamoe/mirai/Bot;
|
||||
public static fun getInstances ()Ljava/util/List;
|
||||
public static fun getInstancesSequence ()Lkotlin/sequences/Sequence;
|
||||
public abstract fun getLogger ()Lnet/mamoe/mirai/utils/MiraiLogger;
|
||||
public abstract fun getNick ()Ljava/lang/String;
|
||||
public abstract fun getOtherClients ()Lnet/mamoe/mirai/contact/ContactList;
|
||||
public fun getStranger (J)Lnet/mamoe/mirai/contact/Stranger;
|
||||
public fun getStrangerOrFail (J)Lnet/mamoe/mirai/contact/Stranger;
|
||||
@ -331,9 +329,6 @@ public abstract interface class net/mamoe/mirai/contact/FileSupported : net/mamo
|
||||
public abstract interface class net/mamoe/mirai/contact/Friend : kotlinx/coroutines/CoroutineScope, net/mamoe/mirai/contact/User, net/mamoe/mirai/contact/VoiceSupported {
|
||||
public fun delete ()V
|
||||
public abstract fun delete (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public abstract fun getId ()J
|
||||
public abstract fun getNick ()Ljava/lang/String;
|
||||
public abstract fun getRemark ()Ljava/lang/String;
|
||||
public fun nudge ()Lnet/mamoe/mirai/message/action/FriendNudge;
|
||||
public synthetic fun nudge ()Lnet/mamoe/mirai/message/action/Nudge;
|
||||
public synthetic fun nudge ()Lnet/mamoe/mirai/message/action/UserNudge;
|
||||
@ -526,8 +521,6 @@ public final class net/mamoe/mirai/contact/Platform$Companion {
|
||||
public abstract interface class net/mamoe/mirai/contact/Stranger : kotlinx/coroutines/CoroutineScope, net/mamoe/mirai/contact/User {
|
||||
public fun delete ()V
|
||||
public abstract fun delete (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public abstract fun getId ()J
|
||||
public abstract fun getNick ()Ljava/lang/String;
|
||||
public synthetic fun nudge ()Lnet/mamoe/mirai/message/action/Nudge;
|
||||
public fun nudge ()Lnet/mamoe/mirai/message/action/StrangerNudge;
|
||||
public synthetic fun nudge ()Lnet/mamoe/mirai/message/action/UserNudge;
|
||||
@ -544,7 +537,6 @@ public final class net/mamoe/mirai/contact/StrangerKt {
|
||||
|
||||
public abstract interface class net/mamoe/mirai/contact/User : kotlinx/coroutines/CoroutineScope, net/mamoe/mirai/contact/Contact, net/mamoe/mirai/contact/UserOrBot {
|
||||
public abstract fun getId ()J
|
||||
public abstract fun getNick ()Ljava/lang/String;
|
||||
public abstract fun getRemark ()Ljava/lang/String;
|
||||
public abstract fun nudge ()Lnet/mamoe/mirai/message/action/UserNudge;
|
||||
public fun queryProfile ()Lnet/mamoe/mirai/data/UserProfile;
|
||||
|
@ -49,21 +49,11 @@ public interface Bot : CoroutineScope, ContactOrBot, UserOrBot {
|
||||
*/
|
||||
public val configuration: BotConfiguration
|
||||
|
||||
/**
|
||||
* QQ 号码. 实际类型为 uint
|
||||
*/
|
||||
public override val id: Long
|
||||
|
||||
/**
|
||||
* 返回 `this`
|
||||
*/
|
||||
public override val bot: Bot get() = this
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
public override val nick: String
|
||||
|
||||
/**
|
||||
* 日志记录器
|
||||
*/
|
||||
|
@ -18,9 +18,13 @@ import net.mamoe.mirai.utils.ExternalResource
|
||||
import net.mamoe.mirai.utils.NotStableForInheritance
|
||||
|
||||
/**
|
||||
* 匿名
|
||||
* 代表匿名群成员.
|
||||
*
|
||||
* 代表匿名群成员
|
||||
* 可通过 [anonymousId] 获取其识别属性. [AnonymousMember.id] 的值由服务器提供因此不可靠.
|
||||
*
|
||||
* 匿名群成员不支持发送私聊消息, 戳一戳, 上传图片.
|
||||
*
|
||||
* @see NormalMember
|
||||
*/
|
||||
@NotStableForInheritance
|
||||
public interface AnonymousMember : Member {
|
||||
|
@ -35,21 +35,6 @@ import net.mamoe.mirai.utils.NotStableForInheritance
|
||||
*/
|
||||
@NotStableForInheritance
|
||||
public interface Friend : User, CoroutineScope, VoiceSupported {
|
||||
/**
|
||||
* QQ 号码
|
||||
*/
|
||||
public override val id: Long
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
public override val nick: String
|
||||
|
||||
/**
|
||||
* 好友备注
|
||||
*/
|
||||
public override val remark: String
|
||||
|
||||
/**
|
||||
* 向这个对象发送消息.
|
||||
*
|
||||
|
@ -28,10 +28,7 @@ import kotlin.time.ExperimentalTime
|
||||
/**
|
||||
* 代表一位普通的群成员.
|
||||
*
|
||||
* 群成员可能也是好友, 但他们在对象类型上不同.
|
||||
* 群成员可以通过 [asFriend] 得到相关好友对象.
|
||||
*
|
||||
* @see
|
||||
* @see AnonymousMember
|
||||
*/
|
||||
@NotStableForInheritance
|
||||
public interface NormalMember : Member {
|
||||
|
@ -43,17 +43,6 @@ import net.mamoe.mirai.utils.NotStableForInheritance
|
||||
*/
|
||||
@NotStableForInheritance
|
||||
public interface Stranger : User, CoroutineScope {
|
||||
/**
|
||||
* QQ 号码
|
||||
*/
|
||||
public override val id: Long
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
public override val nick: String
|
||||
|
||||
|
||||
/**
|
||||
* 向这个对象发送消息.
|
||||
*
|
||||
|
@ -45,11 +45,6 @@ public interface User : Contact, UserOrBot, CoroutineScope {
|
||||
*/
|
||||
public override val id: Long
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
public override val nick: String
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*
|
||||
|
@ -22,7 +22,13 @@ import net.mamoe.mirai.utils.NotStableForInheritance
|
||||
@NotStableForInheritance
|
||||
public interface UserOrBot : ContactOrBot {
|
||||
/**
|
||||
* 昵称
|
||||
* 获取昵称
|
||||
*
|
||||
* ### Kotlin 实用扩展:
|
||||
*
|
||||
* - [nameCardOrNick]: 若该用户是 [群成员][Member], 则优先返回其非空群名片, 否则返回 [nick].
|
||||
* - [remarkOrNameCardOrNick]: 若 [Bot] 对该用户有[备注][User.remark]则返回备注, 否则返回 [nameCardOrNick].
|
||||
*
|
||||
* @since 2.6
|
||||
*/
|
||||
public val nick: String
|
||||
|
Loading…
Reference in New Issue
Block a user