Skip to content

Commit

Permalink
Fix ERR_MODULE_NOT_FOUND for constants file (#1023)
Browse files Browse the repository at this point in the history
Co-authored-by: Max Isom <[email protected]>
  • Loading branch information
sonroyaalmerol and codetheweb authored Apr 28, 2024
1 parent 75d2714 commit e0dfd8c
Show file tree
Hide file tree
Showing 27 changed files with 600 additions and 37 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fixed import issue that broke Muse inside of Docker. Thanks @sonroyaalmerol!

## [2.8.0] - 2024-04-28

### Added
Expand Down Expand Up @@ -35,7 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [2.4.4] - 2023-12-21

- Optimized Docker container to run JS code directly with node instead of yarn, npm and tsx. Reduces memory usage.
- Optimized Docker container to run JS code directly with node instead of yarn, npm and tsx. Reduces memory usage.

## [2.4.3] - 2023-09-10

Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"eslint": "^7.32.0",
"eslint-config-xo": "^0.39.0",
"eslint-config-xo-typescript": "^0.44.0",
"eslint-plugin-import": "2.29.1",
"husky": "^4.3.8",
"prisma": "4.16.0",
"release-it": "^14.11.8",
Expand All @@ -63,12 +64,17 @@
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["import"],
"rules": {
"new-cap": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars-experimental": "error",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/no-implicit-any-catch": "off"
"@typescript-eslint/no-implicit-any-catch": "off",
"import/extensions": [
"error",
"ignorePackages"
]
}
},
"husky": {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/clear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {SlashCommandBuilder} from '@discordjs/builders';
import {TYPES} from '../types.js';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';

@injectable()
export default class implements Command {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/disconnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {SlashCommandBuilder} from '@discordjs/builders';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';

@injectable()
export default class implements Command {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/favorites.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {SlashCommandBuilder} from '@discordjs/builders';
import {APIEmbedField, AutocompleteInteraction, ChatInputCommandInteraction} from 'discord.js';
import {inject, injectable} from 'inversify';
import Command from '.';
import Command from './index.js';
import AddQueryToQueue from '../services/add-query-to-queue.js';
import {TYPES} from '../types.js';
import {prisma} from '../utils/db.js';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/fseek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {SlashCommandBuilder} from '@discordjs/builders';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {prettyTime} from '../utils/time.js';
import durationStringToSeconds from '../utils/duration-string-to-seconds.js';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/loop-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';
import {STATUS} from '../services/player.js';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/loop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';
import {STATUS} from '../services/player.js';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {inject, injectable} from 'inversify';
import {TYPES} from '../types.js';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';

@injectable()
Expand Down
2 changes: 1 addition & 1 deletion src/commands/now-playing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';
import {buildPlayingMessageEmbed} from '../utils/build-embed.js';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/pause.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import {STATUS} from '../services/player.js';
import Command from '.';
import Command from './index.js';

@injectable()
export default class implements Command {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/play.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {URL} from 'url';
import {SlashCommandBuilder} from '@discordjs/builders';
import {inject, injectable} from 'inversify';
import Spotify from 'spotify-web-api-node';
import Command from '.';
import Command from './index.js';
import {TYPES} from '../types.js';
import ThirdParty from '../services/third-party.js';
import getYouTubeAndSpotifySuggestionsFor from '../utils/get-youtube-and-spotify-suggestions-for.js';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {SlashCommandBuilder} from '@discordjs/builders';
import {inject, injectable} from 'inversify';
import {TYPES} from '../types.js';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {buildQueueEmbed} from '../utils/build-embed.js';

@injectable()
Expand Down
2 changes: 1 addition & 1 deletion src/commands/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {inject, injectable} from 'inversify';
import {TYPES} from '../types.js';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';

@injectable()
Expand Down
2 changes: 1 addition & 1 deletion src/commands/replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';

@injectable()
Expand Down
2 changes: 1 addition & 1 deletion src/commands/resume.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {SlashCommandBuilder} from '@discordjs/builders';
import {inject, injectable} from 'inversify';
import Command from '.';
import Command from './index.js';
import {TYPES} from '../types.js';
import PlayerManager from '../managers/player.js';
import {STATUS} from '../services/player.js';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/seek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {parseTime, prettyTime} from '../utils/time.js';
import {SlashCommandBuilder} from '@discordjs/builders';
import durationStringToSeconds from '../utils/duration-string-to-seconds.js';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/shuffle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';

@injectable()
Expand Down
2 changes: 1 addition & 1 deletion src/commands/skip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';
import {buildPlayingMessageEmbed} from '../utils/build-embed.js';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import {STATUS} from '../services/player.js';
import Command from '.';
import Command from './index.js';

@injectable()
export default class implements Command {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/unskip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';
import {buildPlayingMessageEmbed} from '../utils/build-embed.js';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/volume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ChatInputCommandInteraction} from 'discord.js';
import {TYPES} from '../types.js';
import {inject, injectable} from 'inversify';
import PlayerManager from '../managers/player.js';
import Command from '.';
import Command from './index.js';
import {SlashCommandBuilder} from '@discordjs/builders';

@injectable()
Expand Down
2 changes: 1 addition & 1 deletion src/events/guild-create.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Client, Guild} from 'discord.js';
import container from '../inversify.config.js';
import Command from '../commands';
import Command from '../commands/index.js';
import {TYPES} from '../types.js';
import Config from '../services/config.js';
import {prisma} from '../utils/db.js';
Expand Down
2 changes: 1 addition & 1 deletion src/inversify.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import YoutubeAPI from './services/youtube-api.js';
import SpotifyAPI from './services/spotify-api.js';

// Commands
import Command from './commands';
import Command from './commands/index.js';
import Clear from './commands/clear.js';
import Config from './commands/config.js';
import Disconnect from './commands/disconnect.js';
Expand Down
6 changes: 3 additions & 3 deletions src/services/add-query-to-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {buildPlayingMessageEmbed} from '../utils/build-embed.js';
import {getMemberVoiceChannel, getMostPopularVoiceChannel} from '../utils/channels.js';
import {getGuildSettings} from '../utils/get-guild-settings.js';
import {SponsorBlock} from 'sponsorblock-api';
import Config from './config';
import KeyValueCacheProvider from './key-value-cache';
import {ONE_HOUR_IN_SECONDS} from '../utils/constants';
import Config from './config.js';
import KeyValueCacheProvider from './key-value-cache.js';
import {ONE_HOUR_IN_SECONDS} from '../utils/constants.js';

@injectable()
export default class AddQueryToQueue {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/register-commands-on-guild.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {REST} from '@discordjs/rest';
import {Routes} from 'discord-api-types/v10';
import Command from '../commands';
import Command from '../commands/index.js';

interface RegisterCommandsOnGuildOptions {
rest: REST;
Expand Down
Loading

0 comments on commit e0dfd8c

Please sign in to comment.