2022-11-23 13:23:25 +01:00
|
|
|
import { Client, GatewayIntentBits } from "discord.js";
|
|
|
|
|
|
|
|
const client = new Client({
|
|
|
|
intents: [
|
|
|
|
GatewayIntentBits.Guilds
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
const token = process.env["TOKEN"];
|
|
|
|
if (!token) throw new ReferenceError("TOKEN environment variable is missing");
|
|
|
|
|
|
|
|
client.login(token);
|
|
|
|
|
|
|
|
client.on("ready", () => {
|
|
|
|
console.log(`Connected to Discord API. Bot account is ${client.user?.tag} (${client.user?.id})`);
|
|
|
|
});
|
|
|
|
|
2022-11-24 02:12:52 +01:00
|
|
|
export default client;
|
|
|
|
|
|
|
|
import "../commands";
|