mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
fix: 支持类型推导
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { NapCatOneBot11Adapter, OB11Message } from "@/onebot";
|
||||
import { NapCatCore } from "../core";
|
||||
import { SetSpecialTittle } from "@/onebot/action/extends/SetSpecialTittle";
|
||||
import { ActionMap } from "@/onebot/action";
|
||||
|
||||
export const plugin_onmessage = async (adapter: string, core: NapCatCore, obCore: NapCatOneBot11Adapter, message: OB11Message) => {
|
||||
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);
|
||||
export const plugin_onmessage = async (adapter: string, core: NapCatCore, obCore: NapCatOneBot11Adapter, message: OB11Message, action: ActionMap) => {
|
||||
if (message.raw_message === 'ping') {
|
||||
const ret = await action.get('send_group_msg')?.handle({ group_id: String(message.group_id), message: 'pong' }, adapter);
|
||||
console.log(ret);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user