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
at:function
- at(qq, text?, dummy?): AtElem
Parameters
- qq: string | number
Optional
text: stringOptional
dummy: boolean
bface:function
button:function
- button(content): ButtonElem
Parameters
- content: {
appid: number;
rows: {
buttons: Button[];
}[];
}appid: number
rows: {
buttons: Button[];
}[]
Returns ButtonElem
dice:function
face:function
- face(id, big?): FaceElem
Parameters
- id: number
- big: boolean = true
fake:function
- fake(user_id, message, nickname?, time?): ForwardNode
Parameters
- user_id: number
- message: Sendable
Optional
nickname: stringOptional
time: number
flash:function
- flash(file, cache?, timeout?, headers?): FlashElem
Parameters
- file: string | Buffer | Readable
Optional
cache: booleanOptional
timeout: numberOptional
headers: OutgoingHttpHeaders
fromCqcode:function
image:function
- image(file, cache?, timeout?, headers?): ImageElem
Parameters
- file: string | Buffer | Readable
Optional
cache: booleanOptional
timeout: numberOptional
headers: OutgoingHttpHeaders
json:function
location:function
- location(lat, lng, address, id?): LocationElem
Parameters
- lat: number
- lng: number
- address: string
Optional
id: string
long_msg:function
- long_msg(resid): LongMsgElem
Returns LongMsgElem
markdown:function
- markdown(content, config?): MarkdownElem
Parameters
- content: string
Optional
config: {
time: number;
token: string;
unknown?: number;
}time: number
token: string
Optional
unknown?: number
Returns MarkdownElem
mirai:function
music:function
poke:function
record:function
- record(file, data?): PttElem
Parameters
- file: string | Buffer
- data: any = {}
rps:function
sface:function
- sface(id, text?): FaceElem
Parameters
- id: number
Optional
text: string
share:function
- share(url, title, image?, content?): ShareElem
Parameters
- url: string
- title: string
Optional
image: stringOptional
content: string
text:function
video:function
- video(file, data?): VideoElem
Parameters
- file: string | Buffer
- data: any = {}
xml:function
- xml(data, id?): XmlElem
Parameters
- data: string
Optional
id: number
用于构造消息元素