Filter
annotation class Filter(val value: String = "", val mode: FilterMode = FilterMode.IN_LISTENER, val priority: Int = PriorityConstant.DEFAULT, val targets: Array<Filter.Targets> = [], val ifNullPass: Boolean = false, val matchType: MatchType = MatchType.REGEX_MATCHES)(source)
与 @Listener 配合使用,标记为对当前事件处理器的基础属性过滤器。
Types
Link copied to clipboard
annotation class Targets(val components: Array<String> = [], val bots: Array<String> = [], val actors: Array<String> = [], val authors: Array<String> = [], val chatRooms: Array<String> = [], val organizations: Array<String> = [], val groups: Array<String> = [], val guilds: Array<String> = [], val contacts: Array<String> = [], val ats: Array<String> = [], val atBot: Boolean = false)
针对部分特定目标的过滤匹配。
Properties
Link copied to clipboard
Link copied to clipboard
Filter 所产生的“过滤器”的实现模式。默认为注入到事件处理器逻辑之前。
Link copied to clipboard
优先级。 当 mode 为 FilterMode.INTERCEPTOR 时代表其作为拦截器注册时的优先级。
Link copied to clipboard
针对部分特定目标的过滤匹配。