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 };