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
29012d74
Commit
29012d74
authored
May 11, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add docs
parent
aa126840
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
20 deletions
+10
-20
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/MiraiLogger.kt
...rc/commonMain/kotlin/net.mamoe.mirai/utils/MiraiLogger.kt
+2
-0
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactory.kt
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactory.kt
+8
-3
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt
...-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt
+0
-17
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/MiraiLogger.kt
View file @
29012d74
...
@@ -28,6 +28,8 @@ import kotlin.jvm.JvmOverloads
...
@@ -28,6 +28,8 @@ import kotlin.jvm.JvmOverloads
* **注意:** 请为日志做好分类, 即不同的模块使用不同的 [MiraiLogger].
* **注意:** 请为日志做好分类, 即不同的模块使用不同的 [MiraiLogger].
* 如, [Bot] 中使用 identity 为 "Bot(qqId)" 的 [MiraiLogger]
* 如, [Bot] 中使用 identity 为 "Bot(qqId)" 的 [MiraiLogger]
* 而 [Bot] 的网络处理中使用 identity 为 "BotNetworkHandler" 的.
* 而 [Bot] 的网络处理中使用 identity 为 "BotNetworkHandler" 的.
*
* Java 调用: `Utils.getDefaultLogger().invoke(identity)`
*/
*/
var
DefaultLogger
:
(
identity
:
String
?)
->
MiraiLogger
=
{
PlatformLogger
(
it
)
}
var
DefaultLogger
:
(
identity
:
String
?)
->
MiraiLogger
=
{
PlatformLogger
(
it
)
}
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactory.kt
View file @
29012d74
...
@@ -47,6 +47,8 @@ actual interface BotFactory {
...
@@ -47,6 +47,8 @@ actual interface BotFactory {
/**
/**
* 自动加载现有协议的 [BotFactory], 并使用指定的 [配置][configuration] 构造 [Bot] 实例
* 自动加载现有协议的 [BotFactory], 并使用指定的 [配置][configuration] 构造 [Bot] 实例
*
* Java 调用方式: `BotFactoryJvm.newBot(...)`
*/
*/
@JvmName
(
"newBot"
)
@JvmName
(
"newBot"
)
@JvmOverloads
@JvmOverloads
...
@@ -63,6 +65,8 @@ inline fun Bot(context: Context, qq: Long, password: String, configuration: (Bot
...
@@ -63,6 +65,8 @@ inline fun Bot(context: Context, qq: Long, password: String, configuration: (Bot
/**
/**
* 自动加载现有协议的 [BotFactory], 并使用指定的 [配置][configuration] 构造 [Bot] 实例
* 自动加载现有协议的 [BotFactory], 并使用指定的 [配置][configuration] 构造 [Bot] 实例
*
* Java 调用方式: `BotFactoryJvm.newBot(...)`
*/
*/
@JvmName
(
"newBot"
)
@JvmName
(
"newBot"
)
@JvmOverloads
@JvmOverloads
...
@@ -79,6 +83,8 @@ inline fun Bot(qq: Long, password: String, configuration: (BotConfiguration.() -
...
@@ -79,6 +83,8 @@ inline fun Bot(qq: Long, password: String, configuration: (BotConfiguration.() -
/**
/**
* 自动加载现有协议的 [BotFactory], 并使用指定的 [配置][configuration] 构造 [Bot] 实例
* 自动加载现有协议的 [BotFactory], 并使用指定的 [配置][configuration] 构造 [Bot] 实例
*
* Java 调用方式: `BotFactoryJvm.newBot(...)`
*/
*/
@JvmName
(
"newBot"
)
@JvmName
(
"newBot"
)
@JvmOverloads
@JvmOverloads
...
@@ -100,6 +106,8 @@ inline fun Bot(context: Context, qq: Long, passwordMd5: ByteArray, configuration
...
@@ -100,6 +106,8 @@ inline fun Bot(context: Context, qq: Long, passwordMd5: ByteArray, configuration
/**
/**
* 自动加载现有协议的 [BotFactory], 并使用指定的 [配置][configuration] 构造 [Bot] 实例
* 自动加载现有协议的 [BotFactory], 并使用指定的 [配置][configuration] 构造 [Bot] 实例
*
* Java 调用方式: `BotFactoryJvm.newBot(...)`
*/
*/
@JvmName
(
"newBot"
)
@JvmName
(
"newBot"
)
@JvmOverloads
@JvmOverloads
...
@@ -114,9 +122,6 @@ inline fun Bot(qq: Long, passwordMd5: ByteArray, configuration: (BotConfiguratio
...
@@ -114,9 +122,6 @@ inline fun Bot(qq: Long, passwordMd5: ByteArray, configuration: (BotConfiguratio
factory
.
Bot
(
ContextImpl
(),
qq
,
passwordMd5
,
BotConfiguration
().
apply
(
configuration
))
factory
.
Bot
(
ContextImpl
(),
qq
,
passwordMd5
,
BotConfiguration
().
apply
(
configuration
))
// Do not use ServiceLoader. Probably not working on MPP
// Do not use ServiceLoader. Probably not working on MPP
@PublishedApi
@PublishedApi
internal
val
factory
:
BotFactory
=
run
{
internal
val
factory
:
BotFactory
=
run
{
...
...
mirai-core/src/jvmMain/kotlin/net/mamoe/mirai/BotFactoryJvm.kt
deleted
100644 → 0
View file @
aa126840
/*
* Copyright 2020 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
@
file
:
JvmName
(
"BotFactoryJvm"
)
@
file
:
Suppress
(
"FunctionName"
,
"unused"
)
package
net.mamoe.mirai
import
net.mamoe.mirai.utils.BotConfiguration
import
net.mamoe.mirai.utils.Context
import
net.mamoe.mirai.utils.ContextImpl
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