Skip to content

Commit

Permalink
Debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherBThai committed Oct 5, 2019
1 parent 8218f5c commit 4c4273a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ process.on('exit', function(code) {
});

try{
console.log("Manager is going to spawn "+Manager.totalShards+" shards...");
Manager.spawn(Manager.totalShards,5500,120000).catch(console.error);
}catch(err){
console.log("Manager Spawner Error");
console.error(err);
}

Expand Down
1 change: 1 addition & 0 deletions methods/command/patreon/alterHuntbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ function elsa(text,type){
case 'hb':
text.author.name = text.author.name.replace("HuntBot","Bronze Knight");
text.description = shiryu1+" **`I will scour the cosmos for you, my mistress`**";
text.color = 7319500;
if(text.fields.length>=8){
text.fields[7].name = shiryu1+" I'm still gathering knights.";
text.fields[7].value = text.fields[7].value.replace("BEEP BOOP. I AM STILL HUNTING. I WILL BE BACK IN","I'll be back in")
Expand Down
2 changes: 1 addition & 1 deletion overrides/ReactionSocketOverride.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var Messages = {};
module.exports = new class ReactionSocketOverride extends OverrideInterface{

override(client){
console.log("Overriding handlers/index.js");
//console.log("Overriding handlers/index.js");
let handler = require('../node_modules/discord.js/src/client/websocket/handlers/index.js');
handler['MESSAGE_REACTION_ADD'] = (client, packet) => {
if(!client.actions.MessageReactionAdd.handle(packet.d)&&Messages[packet.d.message_id]){
Expand Down
18 changes: 13 additions & 5 deletions owo.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ client.on('message',msg => {

//When the bot client starts
client.on('ready',()=>{
console.log('Logged in as '+client.user.tag+'!');
console.log('Bot has started, with '+client.users.size+' users, in '+client.channels.size+' channels of '+client.guilds.size+' guilds.');
console.log('['+client.shard.ids[0]+'/'+client.shard.count+'] '+client.user.tag+' has started, with '+client.users.size+' users, in '+client.channels.size+' channels of '+client.guilds.size+' guilds.');
if(!debug){
logger.increment("ready");
setInterval(() => {
Expand Down Expand Up @@ -145,7 +144,16 @@ client.on('rateLimit',function(info){
});

client.on('debug',(msg) => {
//console.log("["+client.shard.ids[0]+"] "+msg);
//if(msg.toLowerCase().indexOf('429') === 0){
//}
if(msg.indexOf('GUILD_CREATE') >= 0){
return;
}else if(msg.indexOf('Swept') >= 0){
return;
}else if(msg.indexOf('Sending a heartbeat.') >= 0){
return;
}else if(msg.indexOf('Heartbeat acknowledged') >= 0){
return;
}else if(msg.indexOf('429 hit') >= 0){
return;
}
console.log("["+client.shard.ids[0]+"] "+msg);
});
2 changes: 1 addition & 1 deletion util/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ exports.del = function(table){
}

client.on('connect',function(){
console.log('Redis connected');
//console.log('Redis connected');
});

client.on('error',function(err){
Expand Down

0 comments on commit 4c4273a

Please sign in to comment.