feat: plugin
This commit is contained in:
1 parent
1cd7d0577f
commit
a39b0a4a78
5 files changed
+77
-7
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { OB11Message } from "@/onebot";
|
||||
import { NapCatCore } from "..";
|
||||
import { ActionMap } from "@/onebot/action";
|
||||
|
||||
export const plugin_onmessage = async (adapter: string, core: NapCatCore, action: ActionMap, message: OB11Message) => {
|
||||
if (message.raw_message === 'ping') {
|
||||
const ret = await action.get('send_group_msg')?.handle({ group_id: message.group_id, message: 'pong' }, adapter);
|
||||
console.log(ret);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user