Skip to content

Commit b1c8626

Browse files
committed
🎨(coreLib) 为invoke函数添加弃用
1 parent e445bbd commit b1c8626

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎scripts/coreLibrary/lib/CommandApi.kt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ open class Commands : CommandHandler, TabCompleter, CommandHandlerOld {
318318
}
319319

320320
//compatibility for [CommandInfo.body]
321+
@Deprecated("use CommandHandler instead", level = DeprecationLevel.ERROR,
322+
replaceWith = ReplaceWith("this.handle()")
323+
)
321324
override suspend fun invoke(p1: CommandContext) = error("use CommandHandler")
322325

323326
object Root : Commands() {

0 commit comments

Comments
 (0)