Skip to content

Commit 48a9390

Browse files
committed
fix(*): remove export from deploy script
* the import includes the file as module and causes execution of the deploy * exported list was only used in one spot
1 parent 237f98e commit 48a9390

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

src/deployFunctions/deployGlobal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { TagCommand } from '../interactions/tag.js';
99
import { TestTagCommand } from '../interactions/testtag.js';
1010
import { deploy } from './deploy.js';
1111

12-
export const staticGlobalCommands = [
12+
const staticGlobalCommands = [
1313
DiscordDocsCommand,
1414
GuideCommand,
1515
MdnCommand,

src/handling/handleApplicationCommand.ts

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import process from 'node:process';
2-
import { inlineCode } from '@discordjs/builders';
32
import type { Collection } from '@discordjs/collection';
43
import type { APIApplicationCommandInteraction } from 'discord-api-types/v10';
54
import { ApplicationCommandType } from 'discord-api-types/v10';
65
import type { Response } from 'polka';
76
import { deploy } from '../deployFunctions/deploy.js';
8-
import { staticGlobalCommands } from '../deployFunctions/deployGlobal.js';
97
import { algoliaResponse } from '../functions/algoliaResponse.js';
108
import { resolveOptionsToDocsAutoComplete } from '../functions/autocomplete/docsAutoComplete.js';
119
import { djsDocs } from '../functions/docs.js';
@@ -14,21 +12,31 @@ import { nodeAutoCompleteResolve } from '../functions/node.js';
1412
import type { Tag } from '../functions/tag.js';
1513
import { showTag, reloadTags } from '../functions/tag.js';
1614
import { testTag } from '../functions/testtag.js';
17-
import type { DiscordDocsCommand } from '../interactions/discorddocs.js';
18-
import type { DTypesCommand } from '../interactions/discordtypes.js';
15+
import { DiscordDocsCommand } from '../interactions/discorddocs.js';
16+
import { DTypesCommand } from '../interactions/discordtypes.js';
1917
import { buildDocsCommand, DocsCommand } from '../interactions/docs.js';
20-
import type { GuideCommand } from '../interactions/guide.js';
21-
import type { MdnCommand } from '../interactions/mdn.js';
22-
import type { NodeCommand } from '../interactions/node.js';
23-
import type { TagCommand } from '../interactions/tag.js';
18+
import { GuideCommand } from '../interactions/guide.js';
19+
import { MdnCommand } from '../interactions/mdn.js';
20+
import { NodeCommand } from '../interactions/node.js';
21+
import { TagCommand } from '../interactions/tag.js';
2422
import type { TagReloadCommand } from '../interactions/tagreload.js';
25-
import type { TestTagCommand } from '../interactions/testtag.js';
23+
import { TestTagCommand } from '../interactions/testtag.js';
2624
import type { ArgumentsOf } from '../util/argumentsOf.js';
2725
import { EMOJI_ID_CLYDE_BLURPLE, EMOJI_ID_DTYPES, EMOJI_ID_GUIDE } from '../util/constants.js';
2826
import { reloadDjsVersions } from '../util/djsdocs.js';
2927
import { transformInteraction } from '../util/interactionOptions.js';
3028
import { prepareErrorResponse, prepareResponse } from '../util/respond.js';
3129

30+
const staticGlobalCommands = [
31+
DiscordDocsCommand,
32+
GuideCommand,
33+
MdnCommand,
34+
NodeCommand,
35+
TagCommand,
36+
TestTagCommand,
37+
DTypesCommand,
38+
];
39+
3240
type CommandName =
3341
| 'discorddocs'
3442
| 'docs'

0 commit comments

Comments
 (0)