From 845c97d35c496365793097535853013fff2fdb3f Mon Sep 17 00:00:00 2001 From: na2na-p Date: Fri, 4 Nov 2022 17:06:22 +0900 Subject: [PATCH] =?UTF-8?q?Update=20=E8=B5=B7=E5=8B=95=E6=99=82=E3=83=AD?= =?UTF-8?q?=E3=82=B0=E3=81=AB=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E6=83=85=E5=A0=B1=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/index.ts | 2 ++ src/utils/version.cts | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/utils/version.cts diff --git a/package.json b/package.json index 4957a0de..444a2149 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "2na2-discord", - "version": "1.1.1.4", + "version": "1.2.0.2", "main": "built/index.js", "private": true, "author": "na2na", diff --git a/src/index.ts b/src/index.ts index eda594c7..5f2447a4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import { Na2Client } from '@/client.js'; import _log from '@utils/log.js'; import type { commandSetType } from '@/types/types.js'; +import { version } from '@utils/version.cjs'; function log(msg: string): void { _log(`[Init]: ${msg}`); @@ -48,6 +49,7 @@ const commands: commandSetType[] = [ // VCJoinCommandSetter, TODO: このモジュールは未実装 ]; +log(`2na2-Discord v${version}`); log('Starting Na2Client...'); new Na2Client(hooks, commands); diff --git a/src/utils/version.cts b/src/utils/version.cts new file mode 100644 index 00000000..0ddf5fda --- /dev/null +++ b/src/utils/version.cts @@ -0,0 +1,4 @@ +// HACK: require使うために仕方なくcommonJSに +const { version } = require('@/../package.json'); + +export { version };