Skip to content

Commit 9121e40

Browse files
authored
Merge branch 'master' into feat/p3
2 parents 4221ecd + 828a93a commit 9121e40

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
## [6.6.4] - 2025-10-14
9+
### Fixed:
10+
- Removed debug log in modal context
11+
## [6.6.3] - 2025-09-24
12+
### Fixed:
13+
- Fixed an issue with `SlashCreator.registerCommandsIn` not registering properly after v6.4.2 due to not passing file URLs into `import()`.
814
## [6.6.2] - 2025-09-10
915
### Added:
1016
- Updated types to allow for any selects and text displays in modals.
@@ -637,7 +643,7 @@ This release features mostly completed documentation and changes to the packages
637643
## [0.1.0] - 2020-12-15
638644
- Initial release.
639645

640-
[Unreleased]: https://github.com/Snazzah/slash-create/compare/v6.6.2...HEAD
646+
[Unreleased]: https://github.com/Snazzah/slash-create/compare/v6.6.4...HEAD
641647
[0.1.0]: https://github.com/Snazzah/slash-create/releases/tag/v0.1.0
642648
[0.2.0]: https://github.com/Snazzah/slash-create/compare/v0.1.0...v0.2.0
643649
[1.0.0]: https://github.com/Snazzah/slash-create/compare/v0.2.0...v1.0.0
@@ -721,3 +727,5 @@ This release features mostly completed documentation and changes to the packages
721727
[6.6.0]: https://github.com/Snazzah/slash-create/compare/v6.5.0...v6.6.0
722728
[6.6.1]: https://github.com/Snazzah/slash-create/compare/v6.6.0...v6.6.1
723729
[6.6.2]: https://github.com/Snazzah/slash-create/compare/v6.6.1...v6.6.2
730+
[6.6.3]: https://github.com/Snazzah/slash-create/compare/v6.6.2...v6.6.3
731+
[6.6.4]: https://github.com/Snazzah/slash-create/compare/v6.6.3...v6.6.4

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "slash-create",
3-
"version": "6.6.2",
3+
"version": "6.6.4",
44
"description": "Create and sync Discord slash commands!",
55
"main": "./lib/index.js",
66
"types": "./lib/index.d.ts",

scripts/postbuild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ const filePath = join(__dirname, '../lib/node/creator.js');
55

66
fs.writeFileSync(
77
filePath,
8-
fs.readFileSync(filePath, { encoding: 'utf-8' }).replace('require(filePath)', '(await import(filePath)).default')
8+
fs.readFileSync(filePath, { encoding: 'utf-8' }).replace('require((0, node_url_1.pathToFileURL)(filePath))', '(await import((0, node_url_1.pathToFileURL)(filePath))).default')
99
);

src/node/creator.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { fetch, FormData } from 'undici';
22
import { Blob } from 'node:buffer';
33
import { extname } from 'node:path';
4+
import { pathToFileURL } from 'node:url';
45
import { BaseSlashCreator, FileFilter, SlashCreatorOptions } from '../creator';
56
import { getFiles } from '../node/util';
67
import nacl from 'tweetnacl';
@@ -29,7 +30,8 @@ export class SlashCreator extends BaseSlashCreator {
2930
const commands: any[] = [];
3031
for (const filePath of filteredFiles) {
3132
try {
32-
commands.push(require(filePath));
33+
// @ts-ignore This gets replaced in the post-build
34+
commands.push(require(pathToFileURL(filePath)));
3335
} catch (e) {
3436
this.emit('error', new Error(`Failed to load command ${filePath}: ${e}`));
3537
}

src/structures/interfaces/modalInteractionContext.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export class ModalInteractionContext<
5555
[key: string]: string | string[];
5656
} {
5757
const values: { [key: string]: string | string[] } = {};
58-
console.log(JSON.stringify(components, null, 2));
5958

6059
for (const component of components) {
6160
if (component.type === ComponentType.ACTION_ROW) {

0 commit comments

Comments
 (0)