mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-05 15:11:15 +00:00
feat: 更换演示代码
This commit is contained in:
parent
583f95aae7
commit
d9bb529f8f
@ -1,10 +1,10 @@
|
||||
import { NapCatOneBot11Adapter, OB11Message } from "@/onebot";
|
||||
import SendGroupMsg from "@/onebot/action/group/SendGroupMsg";
|
||||
import { NapCatCore } from "../core";
|
||||
import { SetSpecialTittle } from "@/onebot/action/extends/SetSpecialTittle";
|
||||
|
||||
export const plugin_onmessage = async (adapter: string, core: NapCatCore, obCore: NapCatOneBot11Adapter, message: OB11Message) => {
|
||||
if (message.raw_message === 'ping') {
|
||||
const ret = await new SendGroupMsg(obCore, core).handle({ group_id: String(message.group_id), message: 'pong' }, adapter);
|
||||
console.log(ret);
|
||||
if (message.raw_message.startsWith('设置头衔') && message.group_id) {
|
||||
const ret = await new SetSpecialTittle(obCore, core)
|
||||
.handle({ group_id: message.group_id, user_id: message.user_id, special_title: message.raw_message.replace('设置头衔', '') }, adapter);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user