mirror of
https://github.com/mamoe/mirai.git
synced 2024-12-29 10:00:13 +08:00
Add BotFactory.newBot defaults
This commit is contained in:
parent
61533fe8c1
commit
b63df48729
@ -20,13 +20,23 @@ public interface BotFactory {
|
||||
/**
|
||||
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
|
||||
*/
|
||||
public fun newBot(qq: Long, password: String, configuration: BotConfiguration = BotConfiguration.Default): Bot
|
||||
public fun newBot(qq: Long, password: String, configuration: BotConfiguration): Bot
|
||||
|
||||
/**
|
||||
* 使用 [默认配置][BotConfiguration.Default] 构造 [Bot] 实例
|
||||
*/
|
||||
public fun newBot(qq: Long, password: String): Bot = newBot(qq, password, BotConfiguration.Default)
|
||||
|
||||
/**
|
||||
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
|
||||
*/
|
||||
public fun newBot(qq: Long, passwordMd5: ByteArray, configuration: BotConfiguration): Bot
|
||||
|
||||
/**
|
||||
* 使用 [默认配置][BotConfiguration.Default] 构造 [Bot] 实例
|
||||
*/
|
||||
public fun newBot(qq: Long, passwordMd5: ByteArray): Bot = newBot(qq, passwordMd5, BotConfiguration.Default)
|
||||
|
||||
public companion object INSTANCE : BotFactory {
|
||||
override fun newBot(qq: Long, password: String, configuration: BotConfiguration): Bot {
|
||||
return Mirai.BotFactory.newBot(qq, password, configuration)
|
||||
|
Loading…
Reference in New Issue
Block a user