Tweaked logging levels. Removed informational message when triggering triggers. Removed Github info message displaying the URL.

This commit is contained in:
chris062689 2017-08-02 19:11:05 -04:00
parent 5514b5996d
commit d540ce2d12
3 changed files with 4 additions and 6 deletions

View File

@ -8,7 +8,7 @@ function readWarnings() {
if (err && err.code === 'ENOENT') { return; } if (err && err.code === 'ENOENT') { return; }
if (err) { logger.error(err); } if (err) { logger.error(err); }
app.warnings = JSON.parse(data); app.warnings = JSON.parse(data);
logger.info('Loaded warnings file.'); logger.debug('Loaded warnings file.');
}); });
} }
@ -18,7 +18,7 @@ function readBans() {
if (err && err.code === 'ENOENT') { return; } if (err && err.code === 'ENOENT') { return; }
if (err) { logger.error(err); } if (err) { logger.error(err); }
app.bans = JSON.parse(data); app.bans = JSON.parse(data);
logger.info('Loaded bans file.'); logger.debug('Loaded bans file.');
}); });
} }

View File

@ -76,7 +76,7 @@ client.on('message', message => {
// Check access permissions. // Check access permissions.
if (cachedModule.roles != undefined && findArray(message.member.roles.map(function(x) { return x.name; }), cachedModule.roles) == false) { if (cachedModule.roles != undefined && findArray(message.member.roles.map(function(x) { return x.name; }), cachedModule.roles) == false) {
app.logChannel.sendMessage(`${message.author} attempted to use admin command: ${message.content}`); app.logChannel.sendMessage(`${message.author} attempted to use admin command: ${message.content}`);
logger.info(`${message.author.username} ${message.author} attempted to use admin command: ${message.content}`) logger.info(`${message.author.username} ${message.author} attempted to use admin command: ${message.content}`);
return false; return false;
} }
@ -112,7 +112,7 @@ client.on('message', message => {
cachedTriggers.forEach(function(trigger) { cachedTriggers.forEach(function(trigger) {
if (trigger.roles == undefined || findArray(message.member.roles.map(function(x) { return x.name; }), trigger.roles)) { if (trigger.roles == undefined || findArray(message.member.roles.map(function(x) { return x.name; }), trigger.roles)) {
if (trigger.trigger(message) == true) { if (trigger.trigger(message) == true) {
logger.info(`${message.author.username} ${message.author} [Channel: ${message.channel}] triggered: ${message.content}`); logger.debug(`${message.author.username} ${message.author} [Channel: ${message.channel}] triggered: ${message.content}`);
try { try {
trigger.execute(message); trigger.execute(message);
} catch (err) { logger.error(err); } } catch (err) { logger.error(err); }

View File

@ -22,8 +22,6 @@ exports.execute = function(message) {
} }
let url = `https://github.com/citra-emu/citra/pull/${match[1]}`; let url = `https://github.com/citra-emu/citra/pull/${match[1]}`;
logger.info(url);
request(url, function (error, response, body) { request(url, function (error, response, body) {
if (!error && response.statusCode == 200) { if (!error && response.statusCode == 200) {
message.channel.sendMessage(`Github Pull Request: ${url}`); message.channel.sendMessage(`Github Pull Request: ${url}`);