mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-24 14:30:09 +08:00
Explicit expect function
This commit is contained in:
parent
4b162c546c
commit
96d6268adb
@ -12,7 +12,7 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
*/
|
||||
actual object QQAndroid : BotFactory {
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
override fun Bot(context: Context, qq: Long, password: String, configuration: BotConfiguration): Bot {
|
||||
actual override fun Bot(context: Context, qq: Long, password: String, configuration: BotConfiguration): Bot {
|
||||
return QQAndroidBot(context, BotAccount(qq, password), configuration)
|
||||
}
|
||||
}
|
@ -1,8 +1,17 @@
|
||||
package net.mamoe.mirai.qqandroid
|
||||
|
||||
import net.mamoe.mirai.Bot
|
||||
import net.mamoe.mirai.BotFactory
|
||||
import net.mamoe.mirai.utils.BotConfiguration
|
||||
import net.mamoe.mirai.utils.Context
|
||||
|
||||
/**
|
||||
* QQ for Android
|
||||
*/
|
||||
expect object QQAndroid : BotFactory
|
||||
expect object QQAndroid : BotFactory {
|
||||
|
||||
/**
|
||||
* 使用指定的 [配置][configuration] 构造 [Bot] 实例
|
||||
*/
|
||||
override fun Bot(context: Context, qq: Long, password: String, configuration: BotConfiguration): Bot
|
||||
}
|
@ -15,7 +15,7 @@ import net.mamoe.mirai.utils.MiraiInternalAPI
|
||||
@UseExperimental(MiraiInternalAPI::class)
|
||||
actual object QQAndroid : BotFactory {
|
||||
|
||||
override fun Bot(context: Context, qq: Long, password: String, configuration: BotConfiguration): Bot {
|
||||
actual override fun Bot(context: Context, qq: Long, password: String, configuration: BotConfiguration): Bot {
|
||||
return QQAndroidBot(context, BotAccount(qq, password), configuration)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user