mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Implement ConsoleCommandOwner as object
This commit is contained in:
parent
6bfe5929e8
commit
b9e498aa39
@ -18,7 +18,6 @@ package net.mamoe.mirai.console.command
|
|||||||
import kotlinx.atomicfu.locks.withLock
|
import kotlinx.atomicfu.locks.withLock
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import net.mamoe.mirai.console.MiraiConsoleInternal
|
|
||||||
import net.mamoe.mirai.console.command.internal.*
|
import net.mamoe.mirai.console.command.internal.*
|
||||||
import net.mamoe.mirai.console.plugin.Plugin
|
import net.mamoe.mirai.console.plugin.Plugin
|
||||||
import net.mamoe.mirai.message.data.Message
|
import net.mamoe.mirai.message.data.Message
|
||||||
@ -45,14 +44,8 @@ abstract class PluginCommandOwner(val plugin: Plugin) : CommandOwner() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 代表控制台所有者. 所有的 mirai-console 内建的指令都属于 [ConsoleCommandOwner].
|
* 代表控制台所有者. 所有的 mirai-console 内建的指令都属于 [ConsoleCommandOwner].
|
||||||
*
|
|
||||||
* 由前端实现
|
|
||||||
*/
|
*/
|
||||||
internal abstract class ConsoleCommandOwner : CommandOwner() {
|
object ConsoleCommandOwner : CommandOwner()
|
||||||
companion object {
|
|
||||||
internal val instance get() = MiraiConsoleInternal.consoleCommandOwner
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取已经注册了的属于这个 [CommandOwner] 的指令列表.
|
* 获取已经注册了的属于这个 [CommandOwner] 的指令列表.
|
||||||
|
Loading…
Reference in New Issue
Block a user