Compare commits

..

2 Commits

4 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "noticeuwuzu", "name": "noticeuwuzu",
"version": "v5.0.3@uwuzu1.5.4", "version": "v5.1.1@uwuzu1.5.4",
"description": "uwuzu Notice Bot", "description": "uwuzu Notice Bot",
"main": "dist/main.js", "main": "dist/main.js",
"scripts": { "scripts": {
+4 -1
View File
@@ -1,5 +1,8 @@
import * as fs from "fs"; import * as fs from "fs";
const version = JSON.parse(fs.readFileSync("package.json", "utf-8")).version;
export default function asciiArt() { export default function asciiArt() {
console.log(fs.readFileSync("asciiart.txt", "utf-8")); console.log(fs.readFileSync("asciiart.txt", "utf-8").replace(/(\r?\n)$/, ''));
console.log(`${version}\n`);
} }
+4 -4
View File
@@ -302,8 +302,8 @@ async function event(earthquakeInfo: any): Promise<void> {
sendMail({ sendMail({
to: config.emergency.mail.to, to: config.emergency.mail.to,
subject: "【警告】震度6強以上の地震を受信しました", subject: "【警告】震度6強以上の地震を受信しました",
html: ` text: `
※noticeUwuzu自動送信によるメールです ※noticeUwuzu自動送信によるメールです
【警告】 【警告】
BOT管理者さん、noticeUwuzu自動送信メールです。 BOT管理者さん、noticeUwuzu自動送信メールです。
震度6強以上の地震を受信したため警告メールが送信されました。 震度6強以上の地震を受信したため警告メールが送信されました。
@@ -351,7 +351,7 @@ async function event(earthquakeInfo: any): Promise<void> {
if (earthquakeInfo.earthquake.hypocenter.depth === 0) { if (earthquakeInfo.earthquake.hypocenter.depth === 0) {
depth = "深さ:ごく浅い"; depth = "深さ:ごく浅い";
} else { } else {
depth = `深さ:${earthquakeInfo.hypocenter.depth}km`; depth = `深さ:${String(earthquakeInfo.earthquake.hypocenter.depth)}km`;
} }
} }
@@ -363,7 +363,7 @@ async function event(earthquakeInfo: any): Promise<void> {
earthquakeInfo.earthquake.hypocenter.magnitude !== undefined || earthquakeInfo.earthquake.hypocenter.magnitude !== undefined ||
earthquakeInfo.earthquake.hypocenter.magnitude !== -1 earthquakeInfo.earthquake.hypocenter.magnitude !== -1
) { ) {
magnitude = `マグニチュード:${earthquakeInfo.earthquake.hypocenter.magnitude}`; magnitude = `マグニチュード:${String(earthquakeInfo.earthquake.hypocenter.magnitude)}`;
} }
ueuse(` ueuse(`
+1 -1
View File
@@ -30,7 +30,7 @@ export default function successExit() {
sendMail({ sendMail({
to: config.emergency.mail.to, to: config.emergency.mail.to,
subject: "【警告】前回終了が不適切な可能性", subject: "【警告】前回終了が不適切な可能性",
html: ` text: `
※noticeUwuzu自動送信によるメールです。 ※noticeUwuzu自動送信によるメールです。
【警告】 【警告】
BOT管理者さん、noticeUwuzu自動送信メールです。 BOT管理者さん、noticeUwuzu自動送信メールです。