From 11f29463a685a6084c92747f151d3a271449e50e Mon Sep 17 00:00:00 2001 From: Last2014 Date: Thu, 21 May 2026 22:35:56 +0900 Subject: [PATCH] =?UTF-8?q?Chg:=20=E5=9C=B0=E9=9C=87=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=81=A7=E4=B8=8D=E6=98=8E=E3=81=AA=E6=83=85=E5=A0=B1=E3=82=92?= =?UTF-8?q?=E3=81=9D=E3=82=82=E3=81=9D=E3=82=82=E6=8A=95=E7=A8=BF=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=20/=202026.5.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/feature/earthquake/index.ts | 32 ++++++++++++++++++-------------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 541dd9d..7585f32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 2026.5.7 +- Feat: 朝四時に何してるんだい? +- Chg: pnpm 11.1.3 +- Chg: 地震情報で不明な情報をそもそも投稿しないように +- Del: helpコマンドとmiqコマンドを除く全てのi18nを廃止 + # 2026.5.6 - Fix: 2026.5.5で修正されたと報告した「20件前のユーズを最後に応答したコマンドのユーズとして記録していた問題」を再発させていた問題 diff --git a/package.json b/package.json index 340e4c1..0da40d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notice-uwuzu", - "version": "2026.5.6", + "version": "2026.5.7", "type": "module", "main": "dist/index.js", "scripts": { diff --git a/src/feature/earthquake/index.ts b/src/feature/earthquake/index.ts index 615da79..9ba4128 100644 --- a/src/feature/earthquake/index.ts +++ b/src/feature/earthquake/index.ts @@ -168,20 +168,24 @@ const processMessage = async (message: any) => { const earthquakeNoticeText = []; earthquakeNoticeText.push(`### ${typeMessage[message.issue.type] ?? "地震情報"}`); earthquakeNoticeText.push(`⏰時刻: ${format(new Date(message.earthquake.time), "yyyy年M月d日 H:mm")}頃`); - earthquakeNoticeText.push(`🫨最大震度: scaleMessages[String(message.earthquake.maxScale)]`); - earthquakeNoticeText.push(`📍震源地: ${message.earthquake.hypocenter.name === "" - ? "不明" - : message.earthquake.hypocenter.name}`); - earthquakeNoticeText.push(`💪マグニチュード: ${message.earthquake.hypocenter.magnitude === -1 - ? "不明" - : `M${message.earthquake.hypocenter.magnitude.toFixed(1)}`}`); - earthquakeNoticeText.push(`🪨深さ: ${message.earthquake.hypocenter.depth === 0 - ? "ごく浅い" - : message.earthquake.hypocenter.depth === -1 - ? "不明" - : `${message.earthquake.hypocenter.depth}km`}`); - earthquakeNoticeText.push(domesticTsunamiMessages[(message.earthquake.domesticTsunami ?? "Unknown")]); - earthquakeNoticeText.push(foreignTsunamiMessages[(message.earthquake.foreignTsunami ?? "Unknown")]); + earthquakeNoticeText.push(`🫨最大震度: ${scaleMessages[String(message.earthquake.maxScale)]}`); + earthquakeNoticeText.push(...(message.earthquake.hypocenter.name === "" + ? [] + : [`📍震源地: ${message.earthquake.hypocenter.name}`])); + earthquakeNoticeText.push(...(message.earthquake.hypocenter.magnitude === -1 + ? [] + : [`💪マグニチュード: M${message.earthquake.hypocenter.magnitude.toFixed(1)}`])); + earthquakeNoticeText.push(...(message.earthquake.hypocenter.depth === -1 + ? [] + : [`🪨深さ: ${message.earthquake.hypocenter.depth === 0 + ? "ごく浅い" + : `${message.earthquake.hypocenter.depth}km`}`])); + earthquakeNoticeText.push(...(message.earthquake.domesticTsunami ?? "Unknown" === "Unknown" + ? [] + : [domesticTsunamiMessages[(message.earthquake.domesticTsunami)]])); + earthquakeNoticeText.push(...(message.earthquake.foreignTsunami ?? "Unknown" === "Unknown" + ? [] + : [foreignTsunamiMessages[(message.earthquake.foreignTsunami)]])); earthquakeNoticeText.push(...(pointsMsg === "" ? [] : [EOL + pointsMsg]));