Skip to content

Commit

Permalink
fix: Prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
notdevcody committed Apr 6, 2024
1 parent b98865e commit d114570
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { Client, EmbedBuilder, GatewayIntentBits, InteractionType } from 'discord.js';
import {
Client,
EmbedBuilder,
GatewayIntentBits
} from 'discord.js';
import { commands } from './commands';

const client = new Client({ intents: [GatewayIntentBits.MessageContent] });
Expand All @@ -12,19 +16,21 @@ client.once('ready', () => {
description: commands[command].title,
});
}

client.on('interactionCreate', async (interaction) => {
if (!interaction.isChatInputCommand()) return;
const command = commands[interaction.command.name.toLowerCase()];

if (command) {
interaction.reply({embeds: [
new EmbedBuilder()
.setTitle(command.title)
.setDescription(command.content)
]});
interaction.reply({
embeds: [
new EmbedBuilder()
.setTitle(command.title)
.setDescription(command.content),
],
});
}
})
});
});

client.login(process.env.TOKEN);

0 comments on commit d114570

Please sign in to comment.