ipdbot/functions/logger.js
2022-04-18 15:32:07 +02:00

22 lines
No EOL
538 B
JavaScript

const { client, logch } = require("../index.js")
module.exports = {
// log in discord channel & console
all: function (ttolog) {
console.log(ttolog);
try {
client.channels.cache.get(logch).send(ttolog);
} catch (error) {
console.error(error);
}
},
// log only in discord channel
channel: function (ttolog) {
try {
client.channels.cache.get(logch).send(ttolog);
} catch (error) {
console.error(error);
}
},
};