Skip to content

Commit

Permalink
Updated logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherBThai committed Aug 3, 2020
1 parent 6bb1f4c commit 9b4dfd7
Show file tree
Hide file tree
Showing 23 changed files with 66 additions and 75 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

// Grab tokens and secret files
const debug = false;
const debug = true;
if(!debug) var tracer = require('dd-trace').init()
if(debug) var auth = require('../tokens/scuttester-auth.json');
else var auth = require('../tokens/owo-auth.json');
Expand Down Expand Up @@ -38,10 +38,10 @@ const totalShards = 8;
// How many clusters we will have
var clusters = Math.ceil(shards/totalShards);
if(debug){
shards = 4;
shards = 1;
firstShardID = 0;
lastShardID = shards-1;
clusters = 2
lastShardID = 1;
clusters = 1
}

console.log("Creating shards "+firstShardID+"~"+lastShardID+" out of "+shards+" total shards!");
Expand Down
2 changes: 1 addition & 1 deletion src/commands/CommandInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = class CommandInterface{
if(!channelPerms.has(this.permissions[i])){
if(channelPerms.has("sendMessages")&&channelPerms.has("readMessages"))
params.errorMsg(", the bot does not have the `"+this.permissions[i]+"` permission! Please reinvite the bot, or contact your server admin!",4000);
params.logger.incr(`noperms.${this.permissions}`, 1, params.msg);
params.logger.incr(`noperms`, 1, {permission:this.permissions}, params.msg);
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async function executeCommand(main,p){
await commands[p.command].execute(p);

// Log stats to statsd
logger.incr(`command.${p.commandAlias}`, 1, p.msg);
logger.incr(`command.${p.commandAlias}`, 1, {}, p.msg);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/commands/commandList/battle/util/dailyWeaponUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async function useShards(p, count){
let sql = `UPDATE shards INNER JOIN user ON shards.uid = user.uid SET shards.count = shards.count - ${count} WHERE user.id = ${p.msg.author.id} AND shards.count >= ${count};`;
let result = await p.query(sql);
if(result.changedRows >= 1){
p.logger.decr(`shards.shop.${p.msg.author.id}`, -1 * count);
p.logger.decr(`shards`, -1 * count, {type:'shop'}, p.msg);
return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/commandList/battle/util/rerollUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async function useShards(p){
let sql = `UPDATE shards INNER JOIN user ON shards.uid = user.uid SET shards.count = shards.count - ${rerollPrice} WHERE user.id = ${p.msg.author.id} AND shards.count >= ${rerollPrice};`;
let result = await p.query(sql);
if(result.changedRows >= 1){
p.logger.decr(`shards.reroll.${p.msg.author.id}`, -1 * rerollPrice);
p.logger.decr(`shards`, -1 * rerollPrice, {type:'reroll'}, p.msg);
return true;
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/commandList/battle/util/weaponUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ exports.sell = async function(p,uwid){
result = await p.query(sql);

p.replyMsg(weaponEmoji,`, You sold a(n) **${weapon.rank.name} ${weapon.name}** ${weapon.rank.emoji}${weapon.emoji} for **${price}** cowoncy!`);
p.logger.incr(`cowoncy.sell.${p.msg.author.id}`, price);
p.logger.incr(`cowoncy`, price, {type:'sell'}, p.msg);
}

var sellRank = exports.sellRank = async function(p,rankLoc){
Expand Down Expand Up @@ -755,7 +755,7 @@ var sellRank = exports.sellRank = async function(p,rankLoc){
result = await p.query(sql);

p.replyMsg(weaponEmoji,`, You sold all your ${rank} weapons for **${price}** cowoncy!\n${p.config.emoji.blank} **| Sold:** ${weapons.join('')}`);
p.logger.incr(`cowoncy.sell.${p.msg.author.id}`, price);
p.logger.incr(`cowoncy`, price, {type:'sell'}, p.msg);
}

/* Shorten a uwid to base36 */
Expand Down
4 changes: 2 additions & 2 deletions src/commands/commandList/battle/weaponshards.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ async function dismantleRank(p,rankLoc){
result = await p.query(sql);

p.replyMsg(dismantleEmoji,`, You dismantled all of your ${rank} weapons for **${price}** ${shardEmoji} WeaponShards!\n${p.config.emoji.blank} **| Dismantled:** ${weapons.join('')}`);
p.logger.incr(`shards.dismantle.${p.msg.author.id}`, price);
p.logger.incr(`shards`, price, {type:'dismantle'}, p.msg);
}

async function dismantleId(p,uwid){
Expand Down Expand Up @@ -225,6 +225,6 @@ async function dismantleId(p,uwid){
result = await p.query(sql);

p.replyMsg(dismantleEmoji,`, You dismantled a(n) **${weapon.rank.name} ${weapon.name}** ${weapon.rank.emoji}${weapon.emoji} for **${p.global.toFancyNum(price)}** ${shardEmoji} Weapon Shard${price==1?'':'s'}!`);
p.logger.incr(`shards.dismantle.${p.msg.author.id}`, price);
p.logger.incr(`shards`, price, {type:'dismantle'}, p.msg);

}
2 changes: 1 addition & 1 deletion src/commands/commandList/economy/daily.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ module.exports = new CommandInterface({

text += "\n**⏱ |** Your next daily is in: "+afterMid.hours+"H "+afterMid.minutes+"M "+afterMid.seconds+"S";
rows = await p.query(sql);
p.logger.incr(`cowoncy.daily.${p.msg.author.id}`, gaint + extra);
p.logger.incr(`cowoncy`, gain + extra, {type:'daily'}, p.msg);
if(announcement&&rows[0][0]){
let url = rows[0][0].url;
let embed;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/commandList/economy/give.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ module.exports = new CommandInterface({
}else{
p.send("**💳 | "+msg.author.username+"** sent **"+(p.global.toFancyNum(amount))+" cowoncy** to **"+user.username+"**!");
p.neo4j.give(p.msg,user,amount);
p.logger.incr(`cowoncy.given.${user.id}`, amount);
p.logger.decr(`cowoncy.give.${msg.author.id}`, -1 * amount);
p.logger.incr(`cowoncy`, amount, {type:'given'}, p.msg);
p.logger.decr(`cowoncy`, -1 * amount, {type:'give'}, p.msg);
}
});
}
Expand Down
8 changes: 4 additions & 4 deletions src/commands/commandList/gamble/coinflip.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ module.exports = new CommandInterface({
sql = "UPDATE cowoncy SET money = money "+((win)?"+":"-")+" "+bet+" WHERE id = "+msg.author.id+";";
result = await p.query(sql);
if (win) {
p.logger.incr(`cowoncy.coinflip.${p.msg.author.id}`, bet);
p.logger.incr(`gamble.coinflip.${p.msg.author.id}`);
p.logger.incr(`cowoncy`, bet, {type:'coinflip'}, p.msg);
p.logger.incr(`gamble`, 1, {type:'coinflip'}, p.msg);
} else {
p.logger.decr(`cowoncy.coinflip.${p.msg.author.id}`, -1 * bet);
p.logger.decr(`gamble.coinflip.${p.msg.author.id}`);
p.logger.decr(`cowoncy`, bet * -1, {type:'coinflip'}, p.msg);
p.logger.decr(`gamble`, -1, {type:'coinflip'}, p.msg);
}
let text = "**"+msg.author.username+"** spent **"+cowoncy+" "+(p.global.toFancyNum(bet))+"** and chose "+((choice=='h')?"**heads**":"**tails**");
let text2 = text;
Expand Down
10 changes: 5 additions & 5 deletions src/commands/commandList/gamble/drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async function drop(p){
return;
}
p.neo4j.drop(p.msg, amount);
p.logger.decr(`cowoncy.drop.${p.msg.author.id}`, -1 * amount);
p.logger.decr(`cowoncy`, -1 * amount, {type:'drop'}, p.msg);
p.send("**💰 | "+p.msg.author.username+"** dropped **"+p.global.toFancyNum(amount)+"** cowoncy!\n**<:blank:427371936482328596> |** Use `owo pickup` to pick it up! ",8000);
p.quest("drop");
}
Expand All @@ -81,12 +81,12 @@ async function pickup(p){
p.send("**🚫 | "+p.msg.author.username+"**, you can only pick up as much as you have!");
return;
}else if(result[0][0]&&amount <= result[0][0].amount&&amount<=result[1][0].money){
p.neo4j.pickup(p.msg, amount);
p.logger.incr(`cowoncy.drop.${p.msg.author.id}`, amount);
p.send("**💰 | "+p.msg.author.username+"**, you picked up **"+amount+"** cowoncy from this channel!");
p.neo4j.pickup(p.msg, amount);
p.logger.incr(`cowoncy`, amount, {type:'drop'}, p.msg);
}else{
p.neo4j.drop(p.msg, amount);
p.logger.decr(`cowoncy.drop.${p.msg.author.id}`, -1 * amount);
p.send("**💰 | "+p.msg.author.username+"**, there's not enough cowoncy on the floor!\n**<:blank:427371936482328596> |** You felt nice so you dropped **"+amount+"** cowoncy!",8000);
p.neo4j.drop(p.msg, amount);
p.logger.decr(`cowoncy`, -1 * amount, {type:'drop'}, p.msg);
}
}
2 changes: 1 addition & 1 deletion src/commands/commandList/gamble/lottery.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function bet(con,msg,args,global,p){
"UPDATE cowoncy SET money = money - "+amount+" WHERE id = "+msg.author.id+";";
result = await p.query(sql);

p.logger.decr(`cowoncy.lottery.${msg.author.id}`, -1 * amount);
p.logger.decr(`cowoncy`, -1 * amount, {type:'lottery'}, p.msg);

let sum = parseInt(result[1][0].sum);
let count = result[1][0].count;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/commandList/gamble/slots.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ module.exports = new CommandInterface({

sql = "UPDATE cowoncy SET money = money + "+(win-amount)+" WHERE id = "+msg.author.id+" AND money >= "+amount+";";
result = await p.query(sql);
p.logger.incr(`cowoncy.slots.${p.msg.author.id}`, win - amount);
p.logger.incr(`gamble.slots.${p.msg.author.id}`, logging);
p.logger.incr(`cowoncy`, win - amount, {type:'slots'}, p.msg);
p.logger.incr(`gamble`, logging, {type:'slots'}, p.msg);

//Display slots
let machine = "**`___SLOTS___ `**\n"+moving+" "+moving+" "+moving+" "+msg.author.username+" bet <:cowoncy:416043450337853441> "+(p.global.toFancyNum(amount))+"\n`| |`\n`| |`";
Expand Down
4 changes: 2 additions & 2 deletions src/commands/commandList/points.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ module.exports = new CommandInterface({
sql += "INSERT INTO cowoncy (id,money) VALUES ("+p.msg.author.id+",2) ON DUPLICATE KEY UPDATE money = money + 2;";

await p.query(sql);
p.logger.incr(`cowoncy.points.${p.msg.author.id}`, 2);
p.logger.incr(`points`, 1, p.msg);
p.logger.incr(`cowoncy`, 2, {type:'points'}, p.msg);
p.logger.incr(`points`, 1, {}, p.msg);
}

})
4 changes: 2 additions & 2 deletions src/commands/commandList/social/pray.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ module.exports = new CommandInterface({
p.send(text);
if(user&&quest) p.quest(quest,1,user);
if(opponentPoints&&user)
p.logger.incr(`pray.${p.msg.author.id}.${user.id}`);
p.logger.incr(`pray`, 1, {from:p.msg.author.id, to:user.id});
else
p.logger.incr(`pray.${p.msg.author.id}.self`);
p.logger.incr(`pray`, 1, {from:p.msg.author.id, to:self});
}

})
4 changes: 2 additions & 2 deletions src/commands/commandList/social/util/ringUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports.buy = async function(p,id){
}

// TODO neo4j
p.logger.decr(`cowoncy.ring.${p.msg.author.id}`, -1 * ring.price);
p.logger.decr(`cowoncy`, -1 * ring.price, {type:'ring'}, p.msg);
p.replyMsg(cart,", you bought a"+(p.global.isVowel(ring.name)?"n":"")+" "+ring.emoji+" **"+ring.name+"** for **"+p.global.toFancyNum(ring.price)+"** "+p.config.emoji.cowoncy+"!");
}

Expand Down Expand Up @@ -73,7 +73,7 @@ exports.sell = async function(p,id){
sql = `UPDATE cowoncy SET money = money + ${price} WHERE id = ${p.msg.author.id};`;
await p.query(sql);
// TODO neo4j
p.logger.incr(`cowoncy.ring.${p.msg.author.id}`, price);
p.logger.incr(`cowoncy`, price, {type:'ring'}, p.msg);
p.replyMsg(sold,", you sold a"+(p.global.isVowel(ring.name)?"n":"")+" "+ring.emoji+" **"+ring.name+"** for **"+p.global.toFancyNum(price)+"** "+p.config.emoji.cowoncy);
}

Expand Down
8 changes: 4 additions & 4 deletions src/commands/commandList/utils/vote.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = new CommandInterface({
sql += box.sql;
con.query(sql,function(err,result){
if(err) {console.error(err);return;}
p.logger.incr(`cowoncy.vote.${p.msg.author.id}`, reward + patreonBonus + weekendBonus);
p.logger.incr(`cowoncy`, reward + patreonBonus + weekendBonus, {type:'vote'}, p.msg);
// TODO neo4j
var text = "**☑ |** You have received **"+reward+"** cowoncy for voting!"+patreonMsg(patreonBonus)+"\n";
if(weekend)
Expand All @@ -67,7 +67,7 @@ module.exports = new CommandInterface({
text += "**<:blank:427371936482328596> |** https://discordbots.org/bot/408785106942164992/vote";
p.send(text);
//console.log("\x1b[33m",id+" has voted for the first time!");
p.logger.incr(`votecount.${p.msg.author.id}`);
p.logger.incr(`votecount`, 1, {}, p.msg);
});
}else if(result[0][0].time>=12){
let box = {};
Expand All @@ -88,7 +88,7 @@ module.exports = new CommandInterface({
sql += box.sql;
con.query(sql,function(err,result){
if(err) {console.error(err);return;}
p.logger.incr(`cowoncy.vote.${p.msg.author.id}`, bonus + patreonBonus + weekendBonus);
p.logger.incr(`cowoncy`, bonus + patreonBonus + weekendBonus, {type:'vote'}, p.msg);
// TODO neo4j
var text = "**☑ |** You have received **"+bonus+"** cowoncy for voting!"+patreonMsg(patreonBonus)+"\n";
if(weekend)
Expand All @@ -97,7 +97,7 @@ module.exports = new CommandInterface({
text += "**<:blank:427371936482328596> |** https://discordbots.org/bot/408785106942164992/vote";
p.send(text);
//console.log("\x1b[33m",id+" has voted and received cowoncy!");
p.logger.incr(`votecount.${p.msg.author.id}`);
p.logger.incr(`votecount`, 1, {}, p.msg);
});
}else{
var text = "**☑ |** Click the link to vote and gain 100+ cowoncy!\n";
Expand Down
8 changes: 4 additions & 4 deletions src/commands/commandList/zoo/autohunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ async function claim(p,msg,con,query,bot){
p.send(text);
for(let animal in total){
let tempAnimal = global.validAnimal(animal);
logger.incr(`animal.${tempAnimal.rank}.${tempAnimal.name}.${p.msg.author.id}`, total[animal].count);
logger.incr(`zoo.${p.msg.author.id}`, tempAnimal.points*total[animal].count);
logger.incr(`animal`, total[animal].count, {rank:tempAnimal.rank, name:tempAnimal.name}, p.msg);
logger.incr(`zoo`, tempAnimal.points*total[animal].count, {}, p.msg);
}
logger.incr(`essence.huntbot.${p.msg.author.id}`, totalGain);
logger.incr(`essence`, totalGain, {type:'huntbot'}, p.msg);
}

async function autohunt(p,msg,con,args,global,send){
Expand Down Expand Up @@ -246,7 +246,7 @@ async function autohunt(p,msg,con,args,global,send){
sql = "UPDATE cowoncy SET money = money - "+cowoncy+" WHERE id = "+msg.author.id+";";
sql += "INSERT INTO autohunt (id,start,huntcount,huntmin,password) VALUES ("+msg.author.id+",NOW(),"+huntcount+","+huntmin+",'') ON DUPLICATE KEY UPDATE start = NOW(), huntcount = "+huntcount+",huntmin = "+huntmin+",password = '';";
result = await p.query(sql);
logger.decr(`cowoncy.huntbot.${p.msg.author.id}`, -1 * cowoncy);
logger.decr(`cowoncy`, -1 * cowoncy, {type:'huntbot'}, p.msg);
let min = huntmin%60;
let hour = Math.trunc(huntmin/60);
let timer = "";
Expand Down
6 changes: 3 additions & 3 deletions src/commands/commandList/zoo/catch.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ module.exports = new CommandInterface({
//text += "\n⚠ **|** `battle` and `hunt` cooldowns have increased to prevent rateLimits issues.\n<:blank:427371936482328596> **|** They will revert back to `15s` in the future.";

let result2 = await p.query(sql);
p.logger.decr(`cowoncy.hunt.${p.msg.author.id}`, -5);
p.logger.incr(`cowoncy`, -5, {type:'hunt'}, p.msg);
for(let i in animal.animal){
let tempAnimal = p.global.validAnimal(animal.animal[i][1]);
p.logger.incr(`animal.${tempAnimal.rank}.${tempAnimal.name}.${p.msg.author.id}`, 1);
p.logger.incr(`zoo.${p.msg.author.id}`,tempAnimal.points);
p.logger.incr(`animal`, 1, {rank:tempAnimal.rank, name:tempAnimal.name}, p.msg);
p.logger.incr(`zoo`, tempAnimal.points, {}, p.msg);
}
p.quest("hunt");
p.quest("find",1,animal.typeCount);
Expand Down
8 changes: 4 additions & 4 deletions src/commands/commandList/zoo/sacrifice.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ async function sellAnimal(p,msg,con,animal,count,send,global){
}else{
count = result[0][0].count;
send("**🔪 | "+msg.author.username+"** sacrificed **"+global.unicodeAnimal(animal.value)+"x"+count+"** for **"+essence+" "+(global.toFancyNum(count*animal.essence))+"**");
p.logger.incr(`essence.sacrifice.${p.msg.author.id}`, count * animal.essence);
p.logger.incr(`essence`, count * animal.essence, {type:'sacrifice'}, p.msg);
}
}else if(result[1]&&result[1].affectedRows>0){
send("**🔪 | "+msg.author.username+"** sacrificed **"+global.unicodeAnimal(animal.value)+"x"+count+"** for **"+essence+" "+(global.toFancyNum(count*animal.essence))+"**");
p.logger.incr(`essence.sacrifice.${p.msg.author.id}`, count * animal.essence);
p.logger.incr(`essence`, count * animal.essence, {type:'sacrifice'}, p.msg);
}else{
send("**🚫 | "+msg.author.username+"**, You can't sacrifice more than you have silly! >:c",3000);
}
Expand Down Expand Up @@ -161,7 +161,7 @@ async function sellRank(p,msg,con,rank,send,global){

for(let i in result[0]){
let tempAnimal = p.global.validAnimal(result[0][i].name);
p.logger.incr(`essence.sacrifice.${p.msg.author.id}`, count * rank.essence);
p.logger.incr(`essence`, count * rank.essence, {type:'sacrifice'}, p.msg);
}
}
}
Expand Down Expand Up @@ -206,7 +206,7 @@ async function sellRanks(p,msg,con,ranks,send,global,p){
for(let j in result[count*2]){
let temp = result[count*2][j];
let tempAnimal = p.global.validAnimal(temp.name);
p.logger.incr(`essence.sacrifice.${p.msg.author.id}`, temp.count * rank.essence);
p.logger.incr(`essence`, temp.count * rank.essence, {type:'sacrifice'}, p.msg);
}
count++;
}
Expand Down
8 changes: 4 additions & 4 deletions src/commands/commandList/zoo/sell.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ function sellAnimal(msg,con,animal,count,send,global,p){
}else{
count = result[0][0].count;
send("**🔪 | "+msg.author.username+"** sold **"+global.unicodeAnimal(animal.value)+"x"+count+"** for a total of **<:cowoncy:416043450337853441> "+(global.toFancyNum(count*animal.price))+"**");
p.logger.incr(`cowoncy.sell.${msg.author.id}`, count * animal.price);
p.logger.incr(`cowoncy`, count * animal.price, {type:'sell'}, p.msg);
// TODO neo4j
}
}else if(result.affectedRows>0){
send("**🔪 | "+msg.author.username+"** sold **"+global.unicodeAnimal(animal.value)+"x"+count+"** for a total of **<:cowoncy:416043450337853441> "+(global.toFancyNum(count*animal.price))+"**");
p.logger.incr(`cowoncy.sell.${msg.author.id}`, count * animal.price);
p.logger.incr(`cowoncy`, count * animal.price, {type:'sell'}, p.msg);
// TODO neo4j
}else{
send("**🚫 | "+msg.author.username+"**, You can't sell more than you have silly! >:c",3000);
Expand All @@ -157,7 +157,7 @@ function sellRank(msg,con,rank,send,global,p){
}else{
count = result[0][0].total;
send("**🔪 | "+msg.author.username+"** sold **"+rank.emoji+"x"+count+"** for a total of **<:cowoncy:416043450337853441> "+(global.toFancyNum(count*rank.price))+"**");
p.logger.incr(`cowoncy.sell.${msg.author.id}`, count * rank.price);
p.logger.incr(`cowoncy`, count * rank.price, {type:'sell'}, p.msg);
// TODO neo4j
}
});
Expand Down Expand Up @@ -188,7 +188,7 @@ function sellRanks(msg,con,ranks,send,global,p){
if(sold!=""){
sold = sold.slice(0,-1);
send("**🔪 | "+msg.author.username+"** sold **"+sold+"** for a total of **<:cowoncy:416043450337853441> "+(global.toFancyNum(total))+"**");
p.logger.incr(`cowoncy.sell.${msg.author.id}`, total);
p.logger.incr(`cowoncy`, total, {type:'sell'}, p.msg);
// TODO neo4j
}else
send("**🚫 | "+msg.author.username+"**, You don't have enough animals! >:c",3000);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exports.giveXP = async function(msg){
let xp;
if(!limitHit){
xp = await redis.incr("user_xp",msg.author.id,gain+bonus);
logger.incr('xp', gain+bonus, msg);
logger.incr('xp', gain+bonus, {}, msg);
}
if(!guildLimitHit){
await redis.incr("user_xp_"+msg.channel.guild.id,msg.author.id,gain+guildBonus);
Expand Down
Loading

0 comments on commit 9b4dfd7

Please sign in to comment.