Interface GroupMessage

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

Hierarchy

  • BaseChatMessage
    • GroupMessage

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)

isAt: ((qq?: number) => boolean)

判断是否艾特某人(留空则判断是否艾特自己)

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

消息文本

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

快捷回复函数

sender: Member
type: "GroupMessage"