Feat: 天気予報の分割数を自動的に計算する機能 / Fix: 震度0の地震情報に対応していない問題 / Feat: 最大震度の要求を設定できる機能 / Feat: 最大震度が不明な場合に投稿するかどうかを設定できる機能
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import client from "@/lib/client";
|
||||
import config from "@/lib/config";
|
||||
import initI18n from "@/lib/i18n";
|
||||
import Memory from "@/lib/memory";
|
||||
import i18next from "i18next";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { EOL } from "node:os";
|
||||
@@ -84,7 +84,8 @@ if (!isMainThread && workerData === "scheduledWeatherNotice") {
|
||||
|
||||
export async function weatherReply(uniqid: string) {
|
||||
// インデックス
|
||||
const splitCount = config.weather.splits;
|
||||
const mem = Memory.memory;
|
||||
const splitCount = Math.round(3100 / mem.max_length);
|
||||
const total = cityList.length;
|
||||
const chunkSizes = Array(splitCount).fill(0).map((_, i) =>
|
||||
Math.floor((total + i) / splitCount)
|
||||
|
||||
Reference in New Issue
Block a user