2026.4.0-alpha.2 #11
@@ -50,6 +50,10 @@ eewNotice: |
|
|||||||
📍震源地: {{ epicenter }}
|
📍震源地: {{ epicenter }}
|
||||||
💪マグニチュード: {{ magnitude }}
|
💪マグニチュード: {{ magnitude }}
|
||||||
🪨深さ: {{ depth }}{{ areas }}
|
🪨深さ: {{ depth }}{{ areas }}
|
||||||
|
eewCancelNotice: |
|
||||||
|
### ==緊急地震速報(警報)**解除**==
|
||||||
|
{{ isTest }}
|
||||||
|
⏰発表時刻: {{ announceTime }}
|
||||||
hnyNotice: |
|
hnyNotice: |
|
||||||
あけましておめでとうございます。今年は、{{ year }}年です。
|
あけましておめでとうございます。今年は、{{ year }}年です。
|
||||||
commandNotFound: |
|
commandNotFound: |
|
||||||
|
|||||||
@@ -237,6 +237,24 @@ const processMessage = async (message: any) => {
|
|||||||
{
|
{
|
||||||
console.log("緊急地震速報(警報)を受信しました");
|
console.log("緊急地震速報(警報)を受信しました");
|
||||||
|
|
||||||
|
if (message.cancelled) {
|
||||||
|
const response = await client.request("ueuse/create", {
|
||||||
|
text: i18next.t("eewCancelNotice", {
|
||||||
|
isTest: message.test
|
||||||
|
? "⚒️これは**テストです。**"
|
||||||
|
: "🚨これは**テストではありません。**",
|
||||||
|
announceTime: format(new Date(message.issue.time), "yyyy年M月d日 H:mm:ss"),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!response.success) {
|
||||||
|
console.warn("ユーズの作成に失敗しました:", response.error_code);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("緊急地震速報(警報)解除情報を投稿:", response.uniqid);
|
||||||
|
}
|
||||||
|
|
||||||
const kindMessages: Record<string, string> = {
|
const kindMessages: Record<string, string> = {
|
||||||
"10": "⏳主要動は、**未到達と予測**されています。",
|
"10": "⏳主要動は、**未到達と予測**されています。",
|
||||||
"11": "🫨主要動が、**既に到達していると予測**されています。",
|
"11": "🫨主要動が、**既に到達していると予測**されています。",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ console.log("時報の投稿を行います");
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await client.request("ueuse/create", {
|
const response = await client.request("ueuse/create", {
|
||||||
text: i18next.t("timeNotice", { time: format(new Date(), "HH:mm") }),
|
text: i18next.t("timeNotice", { time: format(new Date(), "H:mm") }),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.success) {
|
if (!response.success) {
|
||||||
|
|||||||
Reference in New Issue
Block a user