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 && result.text && endpoint === "ueuse/create") {
if (result.media.photo) { if (result.media.photo) {
for (let i = 0; i < result.media.photo.length; i++) { 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++) { for (let i = 0; i < result.media.video.length; i++) {
result[`video${i + 1}`] = result.media.video[i]; result[`video${i + 1}`] = result.media.video[i];
} }
} }*/
delete result.media; delete result.media;
} }
+2 -2
View File
@@ -8,14 +8,14 @@ export default interface UeuseCreate {
/** 本文 */ /** 本文 */
text: string; text: string;
/** メディア */ /** メディア */
media: Media; media?: Media;
/** NSFWにするかどうか */ /** NSFWにするかどうか */
nsfw?: boolean; nsfw?: boolean;
/** 返信先ユーズのユニークID */ /** 返信先ユーズのユニークID */
replyid?: string; replyid?: string;
/** リユーズ/引用元ユーズのユニークID */ /** リユーズ/引用元ユーズのユニークID */
reuseid?: string; reuseid?: string;
} & Media; };
response: { response: {
/** 成功かどうか */ /** 成功かどうか */
success: true; success: true;
+2 -2
View File
@@ -1,8 +1,8 @@
export interface Media { export interface Media {
/** 画像URL */ /** 画像URL */
photo: string[]; photo: string[];
/** 動画URL */ ///** 動画URL */
video: string[]; //video: string[];
}; };
export default interface ueuseModule { export default interface ueuseModule {