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]));