mirror of
https://github.com/Alee14/AleeBot.git
synced 2025-01-22 19:21:47 -05:00
debug mode changes
This commit is contained in:
parent
a240c1b879
commit
ca40f7bf25
1 changed files with 12 additions and 12 deletions
|
@ -37,6 +37,18 @@ console.log('This program comes with ABSOLUTELY NO WARRANTY; for details type `s
|
||||||
console.log ('This is free software, and you are welcome to redistribute it');
|
console.log ('This is free software, and you are welcome to redistribute it');
|
||||||
console.log ('under certain conditions; type `show c\' for details.\n')
|
console.log ('under certain conditions; type `show c\' for details.\n')
|
||||||
|
|
||||||
|
if (process.argv.indexOf("--debug") == -1) {
|
||||||
|
log("Running AleeBot without --debug command line flag. Debug output disabled.");
|
||||||
|
} else {
|
||||||
|
console.log('[!] Entering debug mode...')
|
||||||
|
client.on('debug', function(info) {
|
||||||
|
log(info);
|
||||||
|
});
|
||||||
|
client.on('warn', function(info) {
|
||||||
|
log(info);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
client.commands = new Discord.Collection();
|
client.commands = new Discord.Collection();
|
||||||
client.aliases = new Discord.Collection();
|
client.aliases = new Discord.Collection();
|
||||||
|
|
||||||
|
@ -144,18 +156,6 @@ client.on("error", error => {
|
||||||
log(error);
|
log(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (process.argv.indexOf("--debug") == -1) {
|
|
||||||
log("Running AleeBot without --debug command line flag. Debug output disabled.");
|
|
||||||
} else {
|
|
||||||
|
|
||||||
client.on('debug', function(info) {
|
|
||||||
log(info);
|
|
||||||
});
|
|
||||||
client.on('warn', function(info) {
|
|
||||||
log(info);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
client.login(config.abtoken).catch(function() {
|
client.login(config.abtoken).catch(function() {
|
||||||
log('[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com.');
|
log('[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com.');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue