Skip to content

Commit

Permalink
Merge branch 'main' into feat/#1040
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuroXina authored Oct 12, 2023
2 parents ac17a7c + bb03b54 commit 4a92f72
Show file tree
Hide file tree
Showing 9 changed files with 314 additions and 603 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4

- name: actionlint
uses: reviewdog/[email protected].0
uses: reviewdog/[email protected].1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
262 changes: 131 additions & 131 deletions .yarn/releases/yarn-3.6.3.cjs → .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.3.cjs
yarnPath: .yarn/releases/yarn-3.6.4.cjs
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ WORKDIR /app
COPY --from=build /build .

ENTRYPOINT ["node"]
CMD ["build/index.js"]
CMD ["build/index.mjs"]
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@oreorebot2/common",
"private": true,
"packageManager": "[email protected].3",
"packageManager": "[email protected].4",
"workspaces": [
"packages/*"
],
Expand All @@ -22,11 +22,11 @@
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/node": "20.7.1",
"@types/node": "20.8.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "8.50.0",
"eslint-config-next": "13.5.3",
"eslint-config-next": "13.5.4",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-markdown": "^3.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/bot/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "@oreorebot2/bot",
"version": "1.47.2",
"exports": "./index.js",
"exports": "./index.mjs",
"type": "module",
"license": "MIT",
"repository": "https://github.com/approvers/OreOreBot2",
"author": "approvers <[email protected]>",
"scripts": {
"start": "node ./build/index.js",
"start": "node ./build/index.mjs",
"dev": "ts-node --esm ./src/server/index.ts",
"build": "esbuild ./src/server/index.ts --bundle --minify --charset=utf8 --platform=node --target=node16 --format=esm --packages=external --outfile=build/index.js",
"build": "esbuild ./src/server/index.ts --bundle --minify --charset=utf8 --platform=node --target=node18 --format=esm --packages=external --outfile=build/index.mjs",
"lint": "eslint \"./src/**/*.{js,ts}\"",
"format": "prettier --write \"./src/**/*.{js,ts,md}\"",
"test": "vitest run",
"coverage": "vitest run --coverage",
"lint-staged": "lint-staged"
},
"engines": {
"node": ">=14.16"
"node": ">=18"
},
"dependencies": {
"@discordjs/opus": "^0.9.0",
Expand All @@ -37,7 +37,7 @@
"@codedependant/semantic-release-docker": "^4.1.0",
"@oreorebot2/common": "workspace:*",
"@types/deep-equal": "^1.0.1",
"@types/node": "20.7.1",
"@types/node": "20.8.2",
"@types/yargs": "^17.0.22",
"@vitest/coverage-v8": "^0.34.0",
"esbuild": "^0.19.0",
Expand Down
10 changes: 4 additions & 6 deletions packages/bot/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const channelRepository = new DiscordChannelRepository(
client,
GUILD_ID as Snowflake
);
const versionFetcher = new GenVersionFetcher();

if (features.includes('COMMAND')) {
registerAllCommandResponder({
Expand All @@ -170,7 +171,7 @@ if (features.includes('COMMAND')) {
stats,
sheriff: new DiscordSheriff(client),
ping: new DiscordWS(client),
fetcher: new GenVersionFetcher(),
fetcher: versionFetcher,
messageRepo: new DiscordMessageRepository(client),
membersRepo: stats,
roleRepo: roleManager,
Expand Down Expand Up @@ -241,17 +242,14 @@ process.on('SIGTERM', () => {
});

client.once('ready', () => {
const projectVersion = process.env.npm_package_version;
const projectVersion = versionFetcher.version;
const connectionUser = client.user;
if (connectionUser == null) return;
if (projectVersion !== undefined) {
connectionUser.setActivity(`v${projectVersion}`);
}
console.log('======================================');
console.log('起動しました。');
console.log(`ログインユーザー: ${connectionUser.tag}(${connectionUser.id})`);
console.log(`バージョン:`);
console.log(` - ビルド: v${projectVersion ?? 'unknown'}`);
console.log(` - ビルド: v${projectVersion}`);
console.log(` - discord.js: v${version}`);
console.log(` - Node.js: ${process.version}`);
console.log('コンフィグ:');
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
},
"devDependencies": {
"@oreorebot2/common": "workspace:*",
"@types/react": "18.2.23"
"@types/react": "18.2.25"
}
}
Loading

0 comments on commit 4a92f72

Please sign in to comment.