Interface FriendMessage

interface FriendMessage {
    friend: ((...qqs: number[]) => boolean);
    get: (<T>(type: T) => null | SingleMessageMap[T]);
    group: ((...groupIds: number[]) => boolean);
    messageChain: MessageChain & {
        0: Source;
    };
    plain: string;
    reply: ((msgChain: string | MessageChain, quote?: boolean) => Promise<Api.Params.SendMessage>);
    sender: Friend;
    type: "FriendMessage";
}

Hierarchy

  • BaseChatMessage
    • FriendMessage

Properties

friend: ((...qqs: number[]) => boolean)

是否为某个好友 qq 发送 msg.friend(114514)

get: (<T>(type: T) => null | SingleMessageMap[T])

获取消息链中第一次出现的消息类型 例如:msg.get('Quote')

group: ((...groupIds: number[]) => boolean)

是否为某群 groupId 发送 msg.group(114514)

messageChain: MessageChain & {
    0: Source;
}
plain: string

消息文本

reply: ((msgChain: string | MessageChain, quote?: boolean) => Promise<Api.Params.SendMessage>)

快捷回复函数

sender: Friend
type: "FriendMessage"