2026.4.0-beta.0 #12
+5
-1
@@ -10,7 +10,7 @@ weatherReply: |
|
|||||||
降水確率: {{ chanceOfRain }}
|
降水確率: {{ chanceOfRain }}
|
||||||
earthquakeNotice: |
|
earthquakeNotice: |
|
||||||
### ==地震発生==
|
### ==地震発生==
|
||||||
⏰時刻: {{ occuredTime }}
|
⏰時刻: {{ occuredTime }}頃
|
||||||
🫨最大震度: {{ maxScale }}
|
🫨最大震度: {{ maxScale }}
|
||||||
📍震源地: {{ epicenter }}
|
📍震源地: {{ epicenter }}
|
||||||
💪マグニチュード: {{ magnitude }}
|
💪マグニチュード: {{ magnitude }}
|
||||||
@@ -50,10 +50,14 @@ eewNotice: |
|
|||||||
📍震源地: {{ epicenter }}
|
📍震源地: {{ epicenter }}
|
||||||
💪マグニチュード: {{ magnitude }}
|
💪マグニチュード: {{ magnitude }}
|
||||||
🪨深さ: {{ depth }}{{ areas }}
|
🪨深さ: {{ depth }}{{ areas }}
|
||||||
|
|
||||||
|
🔬情報源: P2P地震速報
|
||||||
eewCancelNotice: |
|
eewCancelNotice: |
|
||||||
### ==緊急地震速報(警報)**解除**==
|
### ==緊急地震速報(警報)**解除**==
|
||||||
{{ isTest }}
|
{{ isTest }}
|
||||||
⏰発表時刻: {{ announceTime }}
|
⏰発表時刻: {{ announceTime }}
|
||||||
|
|
||||||
|
🔬情報源: P2P地震速報
|
||||||
hnyNotice: |
|
hnyNotice: |
|
||||||
あけましておめでとうございます。今年は、{{ year }}年です。
|
あけましておめでとうございます。今年は、{{ year }}年です。
|
||||||
commandNotFound: |
|
commandNotFound: |
|
||||||
|
|||||||
+8
-4
@@ -18,18 +18,20 @@ export const createUeuse = async (data: ApiMap["ueuse/create"]["body"], title: s
|
|||||||
const maxLength = mem.max_length;
|
const maxLength = mem.max_length;
|
||||||
const excessedMessage = "👉返信に続きがあります。";
|
const excessedMessage = "👉返信に続きがあります。";
|
||||||
|
|
||||||
// 行単位で分割
|
|
||||||
let lines = data.text.split(EOL);
|
let lines = data.text.split(EOL);
|
||||||
let firstUniqid = "";
|
let firstUniqid = "";
|
||||||
|
let count = 0;
|
||||||
|
|
||||||
while (lines.length > 0) {
|
while (lines.length > 0) {
|
||||||
|
count++;
|
||||||
let currentText = "";
|
let currentText = "";
|
||||||
|
|
||||||
const limit = maxLength - (excessedMessage.length + EOL.length * 2);
|
const limit = maxLength - (excessedMessage.length + EOL.length * 2);
|
||||||
|
|
||||||
while (lines.length > 0) {
|
while (lines.length > 0) {
|
||||||
const nextLine = lines[0];
|
const nextLine = lines[0];
|
||||||
if (nextLine === undefined) break;
|
if (nextLine === undefined)
|
||||||
|
break;
|
||||||
|
|
||||||
if (nextLine.length > limit && currentText === "") {
|
if (nextLine.length > limit && currentText === "") {
|
||||||
const targetLine = lines.shift() || "";
|
const targetLine = lines.shift() || "";
|
||||||
@@ -81,7 +83,9 @@ export const createUeuse = async (data: ApiMap["ueuse/create"]["body"], title: s
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstUniqid === "") firstUniqid = postedUniqid;
|
if (firstUniqid === "")
|
||||||
console.log(`${title}を投稿:`, postedUniqid);
|
firstUniqid = postedUniqid;
|
||||||
|
|
||||||
|
console.log(`${title}を投稿(${count}):`, postedUniqid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user