This commit is contained in:
6
index.js
6
index.js
@ -1,6 +1,6 @@
|
||||
const { Client, Events, GatewayIntentBits, Collection } = require("discord.js");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const log = require("./log");
|
||||
let cfg = {};
|
||||
try {
|
||||
cfg = require("./config.json");
|
||||
@ -28,7 +28,7 @@ fs.readdir("./commands/", (err, files) => {
|
||||
if (!file.endsWith(".js")) return;
|
||||
let props = require(`./commands/${file}`);
|
||||
let commandName = file.split(".")[0];
|
||||
console.log("Loaded command " + commandName);
|
||||
log.info("Loaded command " + commandName);
|
||||
client.commands.set(commandName, props);
|
||||
});
|
||||
});
|
||||
@ -47,7 +47,7 @@ client.once(Events.ClientReady, async (readyClient) => {
|
||||
} catch (e) {
|
||||
console.warn("copyparty is offline, wont work.");
|
||||
}
|
||||
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
|
||||
log.info(`Ready! Logged in as ${readyClient.user.tag}`);
|
||||
});
|
||||
|
||||
client.on(Events.MessageCreate, async (message) => {
|
||||
|
Reference in New Issue
Block a user