mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-01 12:00:34 +08:00
console UI
This commit is contained in:
parent
5fee62f228
commit
b4e06646ba
@ -0,0 +1,43 @@
|
|||||||
|
package net.mamoe.mirai.console
|
||||||
|
|
||||||
|
import net.mamoe.mirai.Bot
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 只需要实现一个这个 传入MiraiConsole 就可以绑定UI层与Console层
|
||||||
|
* 注意线程
|
||||||
|
*/
|
||||||
|
|
||||||
|
interface MiraiConsoleUIFrontEnd {
|
||||||
|
/**
|
||||||
|
* 让UI层展示一条log
|
||||||
|
* identityString: log前面的prefix
|
||||||
|
* identity:log所属的screen, Main=0; Bot=Bot.uin
|
||||||
|
*/
|
||||||
|
fun pushLog(
|
||||||
|
identityString: String,
|
||||||
|
identity: Long,
|
||||||
|
message: String
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 让UI层准备接受新增的一个BOT
|
||||||
|
*/
|
||||||
|
fun prePushBot(
|
||||||
|
identity: Long
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 让UI层接受一个新的bot
|
||||||
|
* */
|
||||||
|
fun pushBot(
|
||||||
|
bot: Bot
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 让UI层更新BOT管理员的数据
|
||||||
|
*/
|
||||||
|
fun pushBotAdminStatus(
|
||||||
|
identity: Long,
|
||||||
|
admins: List<Long>
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user