logchannel command

This commit is contained in:
2022-11-24 12:12:50 +01:00
parent d8365128fc
commit 082bfe6097
8 changed files with 38 additions and 17 deletions

View File

@ -6,15 +6,4 @@ const client = new Client({
]
});
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})`);
});
export default client;
import "../commands";
export default client;

10
src/client/init.ts Normal file
View File

@ -0,0 +1,10 @@
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})`);
});

View File

@ -28,4 +28,6 @@ const dataSource = new DataSource({
migrationsTransactionMode: "each"
});
dataSource.initialize();
export default dataSource;