mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-26 16:10:11 +08:00
Init all command properties on register
This commit is contained in:
parent
aa3c8baccb
commit
d59d67ad9e
@ -99,7 +99,11 @@ internal object CommandManagerImpl : CommandManager, CoroutineScope by Coroutine
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun Command.register(override: Boolean): Boolean {
|
override fun Command.register(override: Boolean): Boolean {
|
||||||
if (this is CompositeCommand) this.subCommands // init
|
if (this is CompositeCommand) this.subCommands // init lazy
|
||||||
|
this.permission // init lazy
|
||||||
|
this.names // init lazy
|
||||||
|
this.description // init lazy
|
||||||
|
this.usage // init lazy
|
||||||
|
|
||||||
modifyLock.withLock {
|
modifyLock.withLock {
|
||||||
if (!override) {
|
if (!override) {
|
||||||
|
Loading…
Reference in New Issue
Block a user