Fix: Load both .ts and .js files for commands/events
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 6s
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 6s
Update file filters to accept both .ts and .js files, so the bot works both in development (with ts-node) and production (compiled). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ const commandFolders = readdirSync(commandsPath);
|
|||||||
|
|
||||||
for (const folder of commandFolders) {
|
for (const folder of commandFolders) {
|
||||||
const folderPath = join(commandsPath, folder);
|
const folderPath = join(commandsPath, folder);
|
||||||
const commandFiles = readdirSync(folderPath).filter(file => file.endsWith('.ts'));
|
const commandFiles = readdirSync(folderPath).filter(file => file.endsWith('.ts') || file.endsWith('.js'));
|
||||||
|
|
||||||
for (const file of commandFiles) {
|
for (const file of commandFiles) {
|
||||||
const filePath = join(folderPath, file);
|
const filePath = join(folderPath, file);
|
||||||
@@ -41,7 +41,7 @@ for (const folder of commandFolders) {
|
|||||||
|
|
||||||
// Load Events
|
// Load Events
|
||||||
const eventsPath = join(__dirname, 'events');
|
const eventsPath = join(__dirname, 'events');
|
||||||
const eventFiles = readdirSync(eventsPath).filter(file => file.endsWith('.ts'));
|
const eventFiles = readdirSync(eventsPath).filter(file => file.endsWith('.ts') || file.endsWith('.js'));
|
||||||
|
|
||||||
for (const file of eventFiles) {
|
for (const file of eventFiles) {
|
||||||
const filePath = join(eventsPath, file);
|
const filePath = join(eventsPath, file);
|
||||||
|
|||||||
Reference in New Issue
Block a user