
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 23s
- 修正BotFunction注解中的Service属性值。 - 直接使用KClass<out Event>初始化functionMap。- 在Initialization类中添加全局事件订阅。 - 重构BotConfig类,增加类型和管理员QQ配置。
18 lines
478 B
Kotlin
18 lines
478 B
Kotlin
package info.alinadace.miraibot.annotation
|
|
|
|
import info.alinadace.miraibot.service.Service
|
|
import net.mamoe.mirai.event.Event
|
|
import kotlin.reflect.KClass
|
|
|
|
/**
|
|
* 机器人方法 需实现[Service]
|
|
* @param value 触发事件类型
|
|
* @author Kane
|
|
* @since 2024/8/29 下午3:48
|
|
* @see Service
|
|
*/
|
|
@Target(AnnotationTarget.CLASS)
|
|
@Retention(AnnotationRetention.RUNTIME)
|
|
@org.springframework.stereotype.Service
|
|
annotation class BotFunction(vararg val value: KClass<out Event>)
|