log: add more logging

This commit is contained in:
1computer1 2020-06-17 04:39:07 -04:00
parent 75cbd4d391
commit 8c5818c57d
2 changed files with 8 additions and 3 deletions

View file

@ -1,14 +1,17 @@
const CompilerClient = require('./struct/CompilerClient'); const CompilerClient = require('./struct/CompilerClient');
const config = require('../config.json'); const config = require('../config.json');
const client = new CompilerClient(config); const client = new CompilerClient(config);
client.once('ready', () => { client.once('ready', () => {
// eslint-disable-next-line no-console
console.log('[Info] Comp_iler ready to go!');
});
client.on('ready', () => {
client.user.setPresence({ client.user.setPresence({
activity: { name: '@Comp_iler help' }, activity: { name: '@Comp_iler help' },
status: 'online' status: 'online'
}); });
// eslint-disable-next-line no-console
console.log('Comp_iler ready to go!');
}); });
client.start(); client.start();

View file

@ -31,6 +31,8 @@ class MessageInvalidListener extends Listener {
} }
} }
const place = message.guild ? message.guild.id : 'DMs';
console.log(`[Info] User ${message.author.id} in ${place} (${parse.language}):\n${parse.code}`);
const [ok, response] = await this.client.myriad.postEval(parse.language, parse.code); const [ok, response] = await this.client.myriad.postEval(parse.language, parse.code);
if (!message.guild || message.channel.permissionsFor(this.client.user).has('ADD_REACTIONS')) { if (!message.guild || message.channel.permissionsFor(this.client.user).has('ADD_REACTIONS')) {
try { try {