Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/templates/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export async function registerCommands(client: DiscordClient, dir: string = '')
for (const file of files) {
const stat = await fs.lstat(path.join(filePath, file));
if (stat.isDirectory()) registerCommands(client, path.join(dir, file));
if (file.endsWith('.js') || file.endsWith('.ts')) {
if (file.endsWith('Command.js') || file.endsWith('Command.ts')) {
const { default: Command } = await import(path.join(dir, file));
const command = new Command();
client.commands.set(command.getName(), command);
Expand All @@ -93,7 +93,7 @@ export async function registerEvents(client: DiscordClient, dir: string = '') {
for (const file of files) {
const stat = await fs.lstat(path.join(filePath, file));
if (stat.isDirectory()) registerEvents(client, path.join(dir, file));
if (file.endsWith('.js') || file.endsWith('.ts')) {
if (file.endsWith('Event.js') || file.endsWith('Event.ts')) {
const { default: Event } = await import(path.join(dir, file));
const event = new Event();
client.events.set(event.getName(), event);
Expand Down