EventParser

abstract class EventParser<out EX : Event.Extra, out E : Event<EX>>

事件原始数据处理器,提供一个从事件得到的原始 JsonElement,将其反序列化为一个 Event 实例。

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun check(eventType: Event.Type, subType: JsonPrimitive): Boolean

通过 eventTypesubType 来判断此事件是否可以由自身处理。

Link copied to clipboard
abstract fun deserialize(decoder: Json, rawData: JsonElement): E

提供原始数据,并将其转化为对应的具体事件类型。

Inheritors

Link copied to clipboard
Link copied to clipboard