Fix: ueuse/create / Fix: parser

This commit is contained in:
2026-04-05 13:07:28 +09:00
parent 1d8a5d3937
commit 5b048f18bf
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -41,15 +41,15 @@ const Parser: parserType = (data, type, endpoint) => {
if (result.media && result.text && endpoint === "ueuse/create") {
if (result.media.photo) {
for (let i = 0; i < result.media.photo.length; i++) {
result[`photo${i + 1}`] = result.media.photo[i];
result[`image${i + 1}`] = result.media.photo[i];
}
}
if (result.media.video) {
/*if (result.media.video) {
for (let i = 0; i < result.media.video.length; i++) {
result[`video${i + 1}`] = result.media.video[i];
}
}
}*/
delete result.media;
}
+2 -2
View File
@@ -8,14 +8,14 @@ export default interface UeuseCreate {
/** 本文 */
text: string;
/** メディア */
media: Media;
media?: Media;
/** NSFWにするかどうか */
nsfw?: boolean;
/** 返信先ユーズのユニークID */
replyid?: string;
/** リユーズ/引用元ユーズのユニークID */
reuseid?: string;
} & Media;
};
response: {
/** 成功かどうか */
success: true;
+2 -2
View File
@@ -1,8 +1,8 @@
export interface Media {
/** 画像URL */
photo: string[];
/** 動画URL */
video: string[];
///** 動画URL */
//video: string[];
};
export default interface ueuseModule {