Commit 869cb81f authored by Him188's avatar Him188

Remove Bot.contains

parent 3e1925e2
......@@ -82,14 +82,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA
*/
actual abstract val friends: ContactList<QQ>
/**
* 判断是否有这个 id 的好友或群.
* 在一些情况下这可能会造成歧义. 请考虑后使用.
*/
actual operator fun contains(id: Long): Boolean {
return this.friends.contains(id) || this.groups.contains(id)
}
/**
* 获取一个好友对象. 若没有这个好友, 则会抛出异常 [NoSuchElementException]
*/
......
......@@ -126,6 +126,7 @@ actual abstract class BotJavaFriendlyAPI actual constructor() {
* @param message 若需要验证请求时的验证消息.
* @param remark 好友备注
*/
@OptIn(MiraiExperimentalAPI::class)
@JvmName("addFriend")
fun __addFriendBlockingForJava__(
id: Long,
......
......@@ -103,11 +103,6 @@ expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor {
*/
abstract val friends: ContactList<QQ>
/**
* 判断是否有这个 id 的好友或群.
*/
operator fun contains(id: Long): Boolean
/**
* 获取一个好友对象. 若没有这个好友, 则会抛出异常 [NoSuchElementException]
*/
......
......@@ -92,14 +92,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA
*/
actual abstract val friends: ContactList<QQ>
/**
* 判断是否有这个 id 的好友或群.
* 在一些情况下这可能会造成歧义. 请考虑后使用.
*/
actual operator fun contains(id: Long): Boolean {
return this.friends.contains(id) || this.groups.contains(id)
}
/**
* 获取一个好友对象. 若没有这个好友, 则会抛出异常 [NoSuchElementException]
*/
......
......@@ -126,6 +126,7 @@ actual abstract class BotJavaFriendlyAPI actual constructor() {
* @param message 若需要验证请求时的验证消息.
* @param remark 好友备注
*/
@OptIn(MiraiExperimentalAPI::class)
@JvmName("addFriend")
fun __addFriendBlockingForJava__(
id: Long,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment