From 12f73c961568f48178b6f01b02d9d6b290a4f4cb Mon Sep 17 00:00:00 2001 From: SASAGAWA Kiyoshi Date: Mon, 22 May 2023 16:31:18 +0900 Subject: [PATCH] add: reboot message. --- index.js | 12 ++++++++++-- package.json | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index aa965a4..5ce9674 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,4 @@ +/* eslint-disable camelcase */ import * as Misskey from 'misskey-js'; import axios from 'axios'; import fs from 'fs'; @@ -9,7 +10,7 @@ import * as dotenv from 'dotenv'; // 設定項目読み込み dotenv.config(); -const { BOT_TOKEN, MISSKEY_URL, JSON_URL } = process.env; +const { BOT_TOKEN, MISSKEY_URL, JSON_URL, npm_package_version } = process.env; // Misskeyへ接続 const cli = new Misskey.api.APIClient( @@ -458,4 +459,11 @@ const salmonrunextra = async () => { // eslint-disable-next-line no-unused-vars const salmonjob = schedule.scheduleJob('0 0 1-23/2 * * *', () => { salmonrun() }); -// salmonrun(); \ No newline at end of file +// salmonrun(); + +// 起動時メッセージ +const upNotice = () => { + sendMessage(`【Bot再起動通知】v${npm_package_version} で起動しました。`); +} + +upNotice(); diff --git a/package.json b/package.json index 46a148b..b1819dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grizzco-misskey-bot", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "description": "Misskeyにスケジュール更新を流すBotです。", "main": "index.js", "type": "module",