10 lines
301 B
TypeScript
Raw Normal View History

2022-11-24 12:12:50 +01:00
import client from "./index";
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})`);
});