mirror of
https://github.com/syuilo/ai.git
synced 2025-01-31 15:39:10 +00:00
parent
59ac631527
commit
70f709c8c3
1 changed files with 9 additions and 2 deletions
|
@ -83,13 +83,20 @@ export default class Message {
|
||||||
await sleep(2000);
|
await sleep(2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.ai.post({
|
const postData = {
|
||||||
replyId: this.note.id,
|
replyId: this.note.id,
|
||||||
text: text,
|
text: text,
|
||||||
fileIds: opts?.file ? [opts?.file.id] : undefined,
|
fileIds: opts?.file ? [opts?.file.id] : undefined,
|
||||||
cw: opts?.cw,
|
cw: opts?.cw,
|
||||||
renoteId: opts?.renote
|
renoteId: opts?.renote
|
||||||
});
|
};
|
||||||
|
|
||||||
|
// DM以外は普通に返信し、DMの場合はDMで返信する
|
||||||
|
if (this.note.visibility != 'specified') {
|
||||||
|
return await this.ai.post(postData);
|
||||||
|
} else {
|
||||||
|
return await this.ai.sendMessage(this.userId, postData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
|
|
Loading…
Reference in a new issue