Fix: parser
This commit is contained in:
@@ -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
@@ -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",
|
||||||
|
|||||||
+8
-4
@@ -39,12 +39,16 @@ 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") {
|
||||||
for (let i = 0; i < result.media.photo.length; i++) {
|
if (result.media.photo) {
|
||||||
result[`photo${i + 1}`] = result.media.photo[i];
|
for (let i = 0; i < result.media.photo.length; i++) {
|
||||||
|
result[`photo${i + 1}`] = result.media.photo[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < result.media.video.length; i++) {
|
if (result.media.video) {
|
||||||
result[`video${i + 1}`] = result.media.video[i];
|
for (let i = 0; i < result.media.video.length; i++) {
|
||||||
|
result[`video${i + 1}`] = result.media.video[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user