mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: 进一步重构
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { NapCatOneBot11Adapter, OB11Message } from "@/onebot";
|
||||
import { NapCatCore } from "@/core";
|
||||
import { ActionMap } from "@/onebot/action";
|
||||
import { OB11PluginAdapter } from "@/onebot/network/plugin";
|
||||
|
||||
export const plugin_onmessage = async (adapter: string, core: NapCatCore, obCtx: NapCatOneBot11Adapter, message: OB11Message, action: ActionMap) => {
|
||||
export const plugin_onmessage = async (adapter: string, core: NapCatCore, obCtx: NapCatOneBot11Adapter, message: OB11Message, action: ActionMap, instance: OB11PluginAdapter) => {
|
||||
if (message.raw_message === 'ping') {
|
||||
const ret = await action.get('send_group_msg')?.handle({ group_id: String(message.group_id), message: 'pong' }, adapter);
|
||||
const ret = await action.get('send_group_msg')?.handle({ group_id: String(message.group_id), message: 'pong' }, adapter, instance.config);
|
||||
console.log(ret);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user