Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
869cb81f
Commit
869cb81f
authored
Mar 24, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Bot.contains
parent
3e1925e2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
21 deletions
+2
-21
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/Bot.kt
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/Bot.kt
+0
-8
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/BotJavaFriendlyAPI.kt
.../androidMain/kotlin/net/mamoe/mirai/BotJavaFriendlyAPI.kt
+1
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
+0
-5
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/Bot.kt
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/Bot.kt
+0
-8
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotJavaFriendlyAPI.kt
.../src/jvmMain/kotlin/net/mamoe/mirai/BotJavaFriendlyAPI.kt
+1
-0
No files found.
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/Bot.kt
View file @
869cb81f
...
@@ -82,14 +82,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA
...
@@ -82,14 +82,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA
*/
*/
actual
abstract
val
friends
:
ContactList
<
QQ
>
actual
abstract
val
friends
:
ContactList
<
QQ
>
/**
* 判断是否有这个 id 的好友或群.
* 在一些情况下这可能会造成歧义. 请考虑后使用.
*/
actual
operator
fun
contains
(
id
:
Long
):
Boolean
{
return
this
.
friends
.
contains
(
id
)
||
this
.
groups
.
contains
(
id
)
}
/**
/**
* 获取一个好友对象. 若没有这个好友, 则会抛出异常 [NoSuchElementException]
* 获取一个好友对象. 若没有这个好友, 则会抛出异常 [NoSuchElementException]
*/
*/
...
...
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/BotJavaFriendlyAPI.kt
View file @
869cb81f
...
@@ -126,6 +126,7 @@ actual abstract class BotJavaFriendlyAPI actual constructor() {
...
@@ -126,6 +126,7 @@ actual abstract class BotJavaFriendlyAPI actual constructor() {
* @param message 若需要验证请求时的验证消息.
* @param message 若需要验证请求时的验证消息.
* @param remark 好友备注
* @param remark 好友备注
*/
*/
@OptIn
(
MiraiExperimentalAPI
::
class
)
@JvmName
(
"addFriend"
)
@JvmName
(
"addFriend"
)
fun
__addFriendBlockingForJava__
(
fun
__addFriendBlockingForJava__
(
id
:
Long
,
id
:
Long
,
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
View file @
869cb81f
...
@@ -103,11 +103,6 @@ expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor {
...
@@ -103,11 +103,6 @@ expect abstract class Bot() : CoroutineScope, LowLevelBotAPIAccessor {
*/
*/
abstract
val
friends
:
ContactList
<
QQ
>
abstract
val
friends
:
ContactList
<
QQ
>
/**
* 判断是否有这个 id 的好友或群.
*/
operator
fun
contains
(
id
:
Long
):
Boolean
/**
/**
* 获取一个好友对象. 若没有这个好友, 则会抛出异常 [NoSuchElementException]
* 获取一个好友对象. 若没有这个好友, 则会抛出异常 [NoSuchElementException]
*/
*/
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/Bot.kt
View file @
869cb81f
...
@@ -92,14 +92,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA
...
@@ -92,14 +92,6 @@ actual abstract class Bot actual constructor() : CoroutineScope, LowLevelBotAPIA
*/
*/
actual
abstract
val
friends
:
ContactList
<
QQ
>
actual
abstract
val
friends
:
ContactList
<
QQ
>
/**
* 判断是否有这个 id 的好友或群.
* 在一些情况下这可能会造成歧义. 请考虑后使用.
*/
actual
operator
fun
contains
(
id
:
Long
):
Boolean
{
return
this
.
friends
.
contains
(
id
)
||
this
.
groups
.
contains
(
id
)
}
/**
/**
* 获取一个好友对象. 若没有这个好友, 则会抛出异常 [NoSuchElementException]
* 获取一个好友对象. 若没有这个好友, 则会抛出异常 [NoSuchElementException]
*/
*/
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotJavaFriendlyAPI.kt
View file @
869cb81f
...
@@ -126,6 +126,7 @@ actual abstract class BotJavaFriendlyAPI actual constructor() {
...
@@ -126,6 +126,7 @@ actual abstract class BotJavaFriendlyAPI actual constructor() {
* @param message 若需要验证请求时的验证消息.
* @param message 若需要验证请求时的验证消息.
* @param remark 好友备注
* @param remark 好友备注
*/
*/
@OptIn
(
MiraiExperimentalAPI
::
class
)
@JvmName
(
"addFriend"
)
@JvmName
(
"addFriend"
)
fun
__addFriendBlockingForJava__
(
fun
__addFriendBlockingForJava__
(
id
:
Long
,
id
:
Long
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment