logchannel command
This commit is contained in:
@ -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
10
src/client/init.ts
Normal 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})`);
|
||||
});
|
@ -28,4 +28,6 @@ const dataSource = new DataSource({
|
||||
migrationsTransactionMode: "each"
|
||||
});
|
||||
|
||||
dataSource.initialize();
|
||||
|
||||
export default dataSource;
|
Reference in New Issue
Block a user