From b2875c9d9036e8f2147725121223f5bba0a24f41 Mon Sep 17 00:00:00 2001 From: na2na <49822810+na2na-p@users.noreply.github.com> Date: Sat, 11 Jun 2022 07:34:14 +0900 Subject: [PATCH] =?UTF-8?q?notes/create=E3=81=AE=E5=9E=8B=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9=E3=82=92=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ai.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/ai.ts b/src/ai.ts index 7d693d4..74d7270 100644 --- a/src/ai.ts +++ b/src/ai.ts @@ -36,6 +36,27 @@ export type Meta = { lastWakingAt: number; }; +type postParam = { + text: string; + visibility?: 'public' | 'home' | 'followers' | 'specified'; + visibleUserIds?: string[]; + cw? : string | null; + localOnly?: boolean; + noExtractMentions?: boolean; + noExtractHashtags?: boolean; + noExtractEmojis?: boolean; + fileIds?: string[]; + replyId?: string; + renoteId?: string; + channelId?: string; + poll?: { + choices: string[]; + multiple?: boolean; + expiresAt?: number | null; + expiredAfter?: number | null; + } +} + /** * 藍 */ @@ -374,7 +395,7 @@ export default class 藍 { * 投稿します */ @autobind - public async post(param: any) { + public async post(param: postParam) { const res = await this.api('notes/create', param); return res.createdNote; }