diff --git a/src/onebot/action/group/GetGuildList.ts b/src/onebot/action/guild/GetGuildList.ts similarity index 100% rename from src/onebot/action/group/GetGuildList.ts rename to src/onebot/action/guild/GetGuildList.ts diff --git a/src/onebot/action/guild/GetGuildProfile.ts b/src/onebot/action/guild/GetGuildProfile.ts new file mode 100644 index 00000000..431fb561 --- /dev/null +++ b/src/onebot/action/guild/GetGuildProfile.ts @@ -0,0 +1,10 @@ +import BaseAction from '../BaseAction'; +import { ActionName } from '../types'; + +export default class GetGuildProfile extends BaseAction { + actionName = ActionName.GetGuildProfile; + + async _handle(payload: null): Promise { + return null; + } +} diff --git a/src/onebot/action/index.ts b/src/onebot/action/index.ts index 7716fa1b..d29c0265 100644 --- a/src/onebot/action/index.ts +++ b/src/onebot/action/index.ts @@ -23,7 +23,7 @@ import GoCQHTTPGetStrangerInfo from './go-cqhttp/GetStrangerInfo'; import SendLike from './user/SendLike'; import SetGroupAddRequest from './group/SetGroupAddRequest'; import SetGroupLeave from './group/SetGroupLeave'; -import GetGuildList from './group/GetGuildList'; +import GetGuildList from './guild/GetGuildList'; import SetFriendAddRequest from './user/SetFriendAddRequest'; import SetGroupWholeBan from './group/SetGroupWholeBan'; import SetGroupName from './group/SetGroupName'; @@ -161,6 +161,7 @@ export function createActionMap(onebotContext: NapCatOneBot11Adapter, coreContex new SetGroupHeader(onebotContext, coreContext), new FetchCustomFace(onebotContext, coreContext), new GoCQHTTPUploadPrivateFile(onebotContext, coreContext), + new GetGuildProfile(onebotContext, coreContext) ]; const actionMap = new Map(); for (const action of actionHandlers) { diff --git a/src/onebot/action/msg/GetMsg.ts b/src/onebot/action/msg/GetMsg.ts index 2d9c5072..72d383d3 100644 --- a/src/onebot/action/msg/GetMsg.ts +++ b/src/onebot/action/msg/GetMsg.ts @@ -28,8 +28,8 @@ class GetMsg extends BaseAction { if (!payload.message_id) { throw Error('参数message_id不能为空'); } - const MsgShortId = await MessageUnique.getShortIdByMsgId(payload.message_id.toString()); - const msgIdWithPeer = await MessageUnique.getMsgIdAndPeerByShortId(MsgShortId || parseInt(payload.message_id.toString())); + const MsgShortId = MessageUnique.getShortIdByMsgId(payload.message_id.toString()); + const msgIdWithPeer = MessageUnique.getMsgIdAndPeerByShortId(MsgShortId || parseInt(payload.message_id.toString())); if (!msgIdWithPeer) { throw ('消息不存在'); } diff --git a/src/onebot/action/types.ts b/src/onebot/action/types.ts index a513028d..8ea51880 100644 --- a/src/onebot/action/types.ts +++ b/src/onebot/action/types.ts @@ -104,5 +104,6 @@ export enum ActionName { FetchCustomFace = 'fetch_custom_face', GOCQHTTP_UploadPrivateFile = 'upload_private_file', TestApi01 = 'test_api_01', - FetchEmojiLike = 'fetch_emoji_like' + FetchEmojiLike = 'fetch_emoji_like', + GetGuildProfile = "get_guild_service_profile" }