refactor(onebot): subscribe every event kind in the pipeline
Conversion still decides whether an event becomes OneBot JSON. The pipeline now lists every kind as handle or drop, so a new converted kind cannot be forgotten.
This commit is contained in:
3 files changed
+186
-100
No files matched your search
@@ -71,9 +71,9 @@ type ConverterFor<K extends QQEventVariant['kind']> =
|
||||
* new `QQEventVariant` kind that forgets a converter is a compile error here —
|
||||
* not a silent `null` at runtime.
|
||||
*/
|
||||
type ConverterRegistry = { [K in QQEventVariant['kind']]: ConverterFor<K> | null };
|
||||
export type ConverterRegistry = { [K in QQEventVariant['kind']]: ConverterFor<K> | null };
|
||||
|
||||
const CONVERTERS: ConverterRegistry = {
|
||||
export const CONVERTERS: ConverterRegistry = {
|
||||
// Messages.
|
||||
friend_message: convertFriendMessage,
|
||||
group_message: convertGroupMessage,
|
||||
|
||||
Reference in new issue
Block a user