From 6fd92973f80a44f28c451636594b3f140c9d81b2 Mon Sep 17 00:00:00 2001 From: Last2014 Date: Sun, 3 May 2026 14:09:35 +0900 Subject: [PATCH] =?UTF-8?q?Chg:=20=E5=9C=B0=E9=9C=87=E7=99=BA=E7=94=9F?= =?UTF-8?q?=E6=83=85=E5=A0=B1=E3=81=AE=E6=99=82=E5=88=BB=E3=81=AB=E9=A0=83?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=20/=20Feat:=20=E3=83=A6=E3=83=BC?= =?UTF-8?q?=E3=82=BA=E3=81=8C=E5=88=86=E5=89=B2=E3=81=AE=E4=BD=95=E5=80=8B?= =?UTF-8?q?=E7=9B=AE=E3=81=AE=E3=83=A6=E3=83=BC=E3=82=BA=E3=81=8B=E3=82=92?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=82=BD=E3=83=BC=E3=83=AB=E3=81=AB=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja.yaml | 6 +++++- src/lib/client.ts | 12 ++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/locales/ja.yaml b/locales/ja.yaml index 813145d..89ab965 100644 --- a/locales/ja.yaml +++ b/locales/ja.yaml @@ -10,7 +10,7 @@ weatherReply: | 降水確率: {{ chanceOfRain }} earthquakeNotice: | ### ==地震発生== - ⏰時刻: {{ occuredTime }} + ⏰時刻: {{ occuredTime }}頃 🫨最大震度: {{ maxScale }} 📍震源地: {{ epicenter }} 💪マグニチュード: {{ magnitude }} @@ -50,10 +50,14 @@ eewNotice: | 📍震源地: {{ epicenter }} 💪マグニチュード: {{ magnitude }} 🪨深さ: {{ depth }}{{ areas }} + + 🔬情報源: P2P地震速報 eewCancelNotice: | ### ==緊急地震速報(警報)**解除**== {{ isTest }} ⏰発表時刻: {{ announceTime }} + + 🔬情報源: P2P地震速報 hnyNotice: | あけましておめでとうございます。今年は、{{ year }}年です。 commandNotFound: | diff --git a/src/lib/client.ts b/src/lib/client.ts index 0780bcc..0024124 100644 --- a/src/lib/client.ts +++ b/src/lib/client.ts @@ -18,18 +18,20 @@ export const createUeuse = async (data: ApiMap["ueuse/create"]["body"], title: s const maxLength = mem.max_length; const excessedMessage = "👉返信に続きがあります。"; - // 行単位で分割 let lines = data.text.split(EOL); let firstUniqid = ""; + let count = 0; while (lines.length > 0) { + count++; let currentText = ""; const limit = maxLength - (excessedMessage.length + EOL.length * 2); while (lines.length > 0) { const nextLine = lines[0]; - if (nextLine === undefined) break; + if (nextLine === undefined) + break; if (nextLine.length > limit && currentText === "") { const targetLine = lines.shift() || ""; @@ -81,7 +83,9 @@ export const createUeuse = async (data: ApiMap["ueuse/create"]["body"], title: s break; } - if (firstUniqid === "") firstUniqid = postedUniqid; - console.log(`${title}を投稿:`, postedUniqid); + if (firstUniqid === "") + firstUniqid = postedUniqid; + + console.log(`${title}を投稿(${count}):`, postedUniqid); } } \ No newline at end of file