10 lines
301 B
TypeScript
10 lines
301 B
TypeScript
|
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})`);
|
||
|
});
|