mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Rename internal.data.builtin to internal.data.builtins
This commit is contained in:
parent
85fa61115e
commit
2b59dec65d
@ -24,7 +24,8 @@ import net.mamoe.mirai.console.command.BuiltInCommands
|
||||
import net.mamoe.mirai.console.command.Command.Companion.primaryName
|
||||
import net.mamoe.mirai.console.data.PluginDataStorage
|
||||
import net.mamoe.mirai.console.internal.command.CommandManagerImpl
|
||||
import net.mamoe.mirai.console.internal.data.builtin.ConsoleDataScope
|
||||
import net.mamoe.mirai.console.internal.data.builtins.AutoLoginConfig
|
||||
import net.mamoe.mirai.console.internal.data.builtins.ConsoleDataScope
|
||||
import net.mamoe.mirai.console.internal.plugin.CuiPluginCenter
|
||||
import net.mamoe.mirai.console.internal.plugin.PluginManagerImpl
|
||||
import net.mamoe.mirai.console.plugin.PluginLoader
|
||||
@ -105,6 +106,16 @@ internal object MiraiConsoleImplementationBridge : CoroutineScope, MiraiConsoleI
|
||||
mainLogger.info { "${PluginManager.plugins.size} plugin(s) loaded." }
|
||||
mainLogger.info { "mirai-console started successfully." }
|
||||
|
||||
for ((id, password) in AutoLoginConfig.plainPasswords) {
|
||||
mainLogger.info { "Auto-login $id" }
|
||||
MiraiConsole.addBot(id, password)
|
||||
}
|
||||
|
||||
for ((id, password) in AutoLoginConfig.md5Passwords) {
|
||||
mainLogger.info { "Auto-login $id" }
|
||||
MiraiConsole.addBot(id, password)
|
||||
}
|
||||
|
||||
// Only for initialize
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package net.mamoe.mirai.console.internal.data.builtins
|
||||
|
||||
import net.mamoe.mirai.console.data.AutoSavePluginConfig
|
||||
import net.mamoe.mirai.console.data.ValueDescription
|
||||
import net.mamoe.mirai.console.data.value
|
||||
|
||||
internal object AutoLoginConfig : AutoSavePluginConfig() {
|
||||
override val saveName: String
|
||||
get() = "AutoLogin"
|
||||
|
||||
@ValueDescription(
|
||||
"""
|
||||
账号和明文密码列表
|
||||
"""
|
||||
)
|
||||
val plainPasswords: MutableMap<Long, String> by value(mutableMapOf())
|
||||
|
||||
|
||||
@ValueDescription(
|
||||
"""
|
||||
账号和 MD5 密码列表
|
||||
"""
|
||||
)
|
||||
val md5Passwords: MutableMap<Long, String> by value(mutableMapOf())
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
|
||||
@file:Suppress("MemberVisibilityCanBePrivate")
|
||||
|
||||
package net.mamoe.mirai.console.internal.data.builtin
|
||||
package net.mamoe.mirai.console.internal.data.builtins
|
||||
|
||||
import net.mamoe.mirai.Bot
|
||||
import net.mamoe.mirai.console.data.AutoSavePluginConfig
|
@ -7,7 +7,7 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.console.internal.data.builtin
|
||||
package net.mamoe.mirai.console.internal.data.builtins
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import net.mamoe.mirai.console.MiraiConsole
|
@ -14,7 +14,7 @@
|
||||
package net.mamoe.mirai.console.util
|
||||
|
||||
import net.mamoe.mirai.Bot
|
||||
import net.mamoe.mirai.console.internal.data.builtin.BotManagerImpl
|
||||
import net.mamoe.mirai.console.internal.data.builtins.BotManagerImpl
|
||||
import net.mamoe.mirai.contact.User
|
||||
|
||||
public interface BotManager {
|
||||
|
Loading…
Reference in New Issue
Block a user