Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 1603ca7

Browse files
committed
Fixing checkOwner and publish logic
1 parent d6da42a commit 1603ca7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/core/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"publish": {
1919
"executor": "nx:run-commands",
2020
"options": {
21-
"command": "node tools/scripts/publish.mjs 3mf-parser {args.ver} {args.tag}"
21+
"command": "node tools/scripts/publish.js @node-bambu/core {args.ver} {args.tag}"
2222
},
2323
"dependsOn": ["build"]
2424
},

packages/discord/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"publish": {
1818
"executor": "nx:run-commands",
1919
"options": {
20-
"command": "node tools/scripts/publish.mjs 3mf-parser {args.ver} {args.tag}"
20+
"command": "node tools/scripts/publish.js @node-bambu/discord {args.ver} {args.tag}"
2121
},
2222
"dependsOn": ["build"]
2323
},

packages/discord/src/Service/InteractionHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class InteractionHandler {
5757
}
5858

5959
private checkOwner(interaction: ButtonInteraction, { printer: { owners } }: BambuRepositoryItem) {
60-
return owners.includes(interaction.user.id);
60+
return owners.map((x) => x.id).includes(interaction.user.id);
6161
}
6262

6363
private async changeSpeed(interaction: ButtonInteraction, printer: BambuRepositoryItem, speedUp: boolean) {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
* You might need to authenticate with NPM before running this script.
88
*/
99

10-
import { readCachedProjectGraph } from '@nrwl/devkit';
11-
import { execSync } from 'child_process';
12-
import { readFileSync, writeFileSync } from 'fs';
13-
import chalk from 'chalk';
10+
const { readCachedProjectGraph } = require('@nrwl/devkit');
11+
const { execSync } = require('node:child_process');
12+
const { readFileSync, writeFileSync } = require('node:fs');
13+
const chalk = require('chalk');
1414

1515
function invariant(condition, message) {
1616
if (!condition) {

0 commit comments

Comments
 (0)