1 Commits

Author SHA1 Message Date
last2014 ed710dc45a Fix: parser 2026-04-05 12:54:14 +09:00
3 changed files with 12 additions and 8 deletions
+3 -3
View File
@@ -5,13 +5,13 @@
## インストール ## インストール
```bash ```bash
# npm # npm
npm install git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.5 npm install git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.6
# yarn # yarn
yarn add git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.5 yarn add git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.6
# pnpm # pnpm
pnpm add git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.5 pnpm add git+https://gitea.last2014.com/last2014/better-uwuzu-sdk.git#1.1.6
``` ```
> **NOTE** > **NOTE**
> このSDKはnpmリポジトリがありません。Gitリポジトリを使用しています。 > このSDKはnpmリポジトリがありません。Gitリポジトリを使用しています。
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "better-uwuzu-sdk", "name": "better-uwuzu-sdk",
"version": "1.1.5", "version": "1.1.6",
"description": "A better uwuzu SDK.", "description": "A better uwuzu SDK.",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/types/index.d.ts", "types": "dist/types/index.d.ts",
+4
View File
@@ -39,14 +39,18 @@ const Parser: parserType = (data, type, endpoint) => {
if (type === "request") { if (type === "request") {
if (result.media && result.text && endpoint === "ueuse/create") { if (result.media && result.text && endpoint === "ueuse/create") {
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[`photo${i + 1}`] = result.media.photo[i];
} }
}
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];
} }
} }
}
return result; return result;
} else { } else {