Variable segmentConst

segment: {
    at(qq: string | number, text?: string, dummy?: boolean): AtElem;
    bface(file: string, text: string): BfaceElem;
    button(content: {
        appid: number;
        rows: {
            buttons: Button[];
        }[];
    }): ButtonElem;
    dice(id?: number): MfaceElem;
    face(id: number, big?: boolean): FaceElem;
    fake(user_id: number, message: Sendable, nickname?: string, time?: number): ForwardNode;
    flash(file: string | Buffer | Readable, cache?: boolean, timeout?: number, headers?: OutgoingHttpHeaders): FlashElem;
    fromCqcode(str: string): MessageElem[];
    image(file: string | Buffer | Readable, cache?: boolean, timeout?: number, headers?: OutgoingHttpHeaders): ImageElem;
    json(data: any): JsonElem;
    location(lat: number, lng: number, address: string, id?: string): LocationElem;
    long_msg(resid: string): LongMsgElem;
    markdown(content: string, config?: {
        time: number;
        token: string;
        unknown?: number;
    }): MarkdownElem;
    mirai(data: string): MiraiElem;
    music(id: string, platform?: MusicPlatform): Promise<JsonElem>;
    poke(id: number): PokeElem;
    record(file: string | Buffer, data?: any): PttElem;
    rps(id?: number): MfaceElem;
    sface(id: number, text?: string): FaceElem;
    share(url: string, title: string, image?: string, content?: string): ShareElem;
    text(text: string): TextElem;
    video(file: string | Buffer, data?: any): VideoElem;
    xml(data: string, id?: number): XmlElem;
} = ...

用于构造消息元素

Type declaration