diff --git a/packages/discord-bot/src/discord/AppDiscord.ts b/packages/discord-bot/src/discord/AppDiscord.ts index a25f7cbd..9cd7e8c9 100644 --- a/packages/discord-bot/src/discord/AppDiscord.ts +++ b/packages/discord-bot/src/discord/AppDiscord.ts @@ -1,12 +1,12 @@ import { Discord } from '@typeit/discord'; import * as Path from 'path'; - // Within a docker container: We are using tsc, so we want to load the compiled files. // For local dev, we are transpiling: Load the .ts files. -const glob = process.env.RUNTIME_ENV === 'docker' ? - Path.join(__dirname, 'commands', '*.js') : - Path.join(__dirname, 'commands', '*.ts') +const glob = + process.env.RUNTIME_ENV === 'docker' + ? Path.join(__dirname, 'commands', '*.js') + : Path.join(__dirname, 'commands', '!(*.d).ts'); @Discord('', { import: [glob], diff --git a/packages/discord-bot/src/index.ts b/packages/discord-bot/src/index.ts index 8e496a10..b8ded4f4 100644 --- a/packages/discord-bot/src/index.ts +++ b/packages/discord-bot/src/index.ts @@ -5,9 +5,10 @@ import { CONFIG } from './config'; // Within a docker container: We are using tsc, so we want to load the compiled files. // For local dev, we are transpiling: Load the .ts files. -const glob = process.env.RUNTIME_ENV === 'docker' ? - `${__dirname}/discord/**/*.js` : - `${__dirname}/discord/**/*.ts` +const glob = + process.env.RUNTIME_ENV === 'docker' + ? `${__dirname}/discord/**/*.js` + : `${__dirname}/discord/**/!(*.d).ts`; async function createDiscordClient(): Promise { const client = new Client({