fix & refactor: pass actions through constructor

This commit is contained in:
Wesley F. Young committed 2024-08-12 12:08:53 +08:00
1 parent 8fe82e0631
commit c508fd5b05
7 files changed
+77 -128

No files matched your search

+1 -1
View File
@@ -162,7 +162,7 @@ export function createActionMap(onebotContext: NapCatOneBot11Adapter, coreContex
new FetchCustomFace(onebotContext, coreContext),
new GoCQHTTPUploadPrivateFile(onebotContext, coreContext),
];
const actionMap = new Map<string, BaseAction<any, any>>();
const actionMap = new Map();
for (const action of actionHandlers) {
actionMap.set(action.actionName, action);
actionMap.set(action.actionName + '_async', action);