mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-01-25 06:08:03 -05:00
Ignore d.ts files in discord bot glob
This commit is contained in:
committed by
Alec LaLonde
parent
f653d0879e
commit
51f82e6e2c
@@ -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],
|
||||
|
||||
@@ -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<Client> {
|
||||
const client = new Client({
|
||||
|
||||
Reference in New Issue
Block a user