25.12.0-alpha.0
This commit is contained in:
@@ -1,63 +1,48 @@
|
||||
// 起動チェック
|
||||
import Check from "./checks/main.js";
|
||||
(async () => {
|
||||
await Check();
|
||||
})();
|
||||
(await import("@/scripts/checks/main")).default();
|
||||
(await import("@/scripts/successExit")).default();
|
||||
|
||||
// 定期実行読み込み
|
||||
import * as cron from "node-cron";
|
||||
|
||||
// 機能読み込み
|
||||
import timeNotice from "./scripts/timeNotice.js";
|
||||
import { weatherNotice } from "./scripts/weatherNotice.js";
|
||||
import earthquakeNotice from "./scripts/earthquakeNotice.js";
|
||||
import EventDays from "./scripts/eventday.js";
|
||||
import Commands from "./scripts/commands/main.js";
|
||||
|
||||
// その他機能
|
||||
import asciiArt from "./scripts/asciiart.js";
|
||||
asciiArt();
|
||||
import successExit from "./scripts/successExit.js";
|
||||
successExit();
|
||||
// アスキーアート
|
||||
(await import("@/scripts/asciiart")).default();
|
||||
|
||||
// 地震情報観測開始
|
||||
earthquakeNotice();
|
||||
(await import("@/scripts/earthquakeNotice")).default();
|
||||
|
||||
// 時報(1時間/1回)
|
||||
cron.schedule("0 * * * *", () => {
|
||||
timeNotice();
|
||||
// 定期実行
|
||||
import * as cron from "node-cron";
|
||||
|
||||
/// 時報(1時間毎)
|
||||
cron.schedule("0 * * * *", async () => {
|
||||
(await import("@/scripts/timeNotice")).default();
|
||||
});
|
||||
|
||||
// コマンド(10分/1回)
|
||||
cron.schedule("*/10 * * * *", () => {
|
||||
Commands();
|
||||
// コマンド(10分毎)
|
||||
cron.schedule("*/10 * * * *", async () => {
|
||||
(await import("@/scripts/commands/main")).default();
|
||||
});
|
||||
|
||||
// 祝日などお知らせ(毎日0:00)
|
||||
cron.schedule("0 0 * * *", () => {
|
||||
EventDays();
|
||||
// 祝日など(毎日0:00)
|
||||
cron.schedule("0 0 * * *", async () => {
|
||||
(await import("@/scripts/eventday")).default();
|
||||
});
|
||||
|
||||
// 天気お知らせ(毎日7:00)
|
||||
import { setTimeout } from "timers";
|
||||
cron.schedule("0 7 * * *", () => {
|
||||
setTimeout(() => {
|
||||
weatherNotice();
|
||||
}, 100);
|
||||
cron.schedule("0 7 * * *", async () => {
|
||||
(await import("@/scripts/weatherNotice")).weatherNotice();
|
||||
});
|
||||
|
||||
// 管理パネル
|
||||
import AdminPanel from "./panel/main.js";
|
||||
(async () => {
|
||||
await AdminPanel();
|
||||
})();
|
||||
await (await import("./panel/main")).default()
|
||||
|
||||
// 起動表示
|
||||
console.log("BOTサーバーが起動しました");
|
||||
|
||||
import config from "./config.js";
|
||||
import { styleText } from "util";
|
||||
if (config.debug !== undefined) {
|
||||
if ((await import("./config")).default.debug) {
|
||||
// TLSを任意に設定
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
||||
console.log(styleText(["bgRed", "cyan", "bold"], "デバッグモードで起動中"));
|
||||
|
||||
console.log((await import("node:util")).styleText(
|
||||
["bgRed", "cyan", "bold"],
|
||||
"デバッグモードで起動中"
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user