Skip to content

Commit

Permalink
fix style check
Browse files Browse the repository at this point in the history
  • Loading branch information
NewBieCoderXD committed Aug 12, 2024
1 parent 37dae28 commit 9939d88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/discord/getCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import DiscordCommandHandler from '../interfaces/DiscordCommandHandler'
export async function getCommands(): Promise<DiscordCommandHandler> {
const commands: DiscordCommandHandler = {}
const commandFiles = fs.readdirSync(path.join(__dirname, '../commands'))
await Promise.all(commandFiles.map(async (file)=>{
const { default: command } = await import(`../commands/${file}`)
commands[command.name] = command
}))
await Promise.all(
commandFiles.map(async (file) => {
const { default: command } = await import(`../commands/${file}`)
commands[command.name] = command
})
)
return commands
}

Expand Down
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export async function start() {
await registerCommands(commands)

// let channels = await db.getAllChannels();
console.log("found commands",Object.keys(commands))
console.log('found commands', Object.keys(commands))
client.login(env.DISCORD_TOKEN)
}

Expand Down

0 comments on commit 9939d88

Please sign in to comment.