diff --git a/src/Client.ts b/src/Client.ts index c5ea150..07894d4 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -5,7 +5,7 @@ import Datastore from "./client/datastore.js"; import { command, radio } from "./client/utils/typings.js"; import config from "./config.js"; import messages from "./client/messages.js"; -import path from "path" +import path from "path"; const GatewayIntents = new Discord.Intents(); GatewayIntents.add( @@ -32,6 +32,7 @@ class RadioClient extends Client { this.funcs.check = require("./client/funcs/check.js"); this.funcs.checkFetchStatus = require("./client/funcs/checkFetchStatus.js"); this.funcs.isDev = require("./client/funcs/isDev.js"); + this.funcs.logger = require("./client/funcs/logger.js"); this.funcs.msToTime = require("./client/funcs/msToTime.js"); this.funcs.statisticsUpdate = require("./client/funcs/statisticsUpdate.js"); diff --git a/src/client/funcs/logger.js b/src/client/funcs/logger.js new file mode 100644 index 0000000..ec961ef --- /dev/null +++ b/src/client/funcs/logger.js @@ -0,0 +1,4 @@ +module.exports = function (area, text){ + let date = new Date(); + console.log('[' + area + '](' + date.toISOString() + ') – ' + text); +} \ No newline at end of file