import { Client, GatewayIntentBits } from "discord.js";

const client = new Client({
	intents: [GatewayIntentBits.Guilds],
});

const token = process.env.DISCORD_BOT_TOKEN;

if (!token) {
	throw new Error("DISCORD_BOT_TOKEN environment variable is not set.");
}

client.login(token);

client.on("ready", () => {
	console.log(`Logged in as ${client.user?.tag}`);
});

export default client;
