tagged all debugs :)
This commit is contained in:
11
bot.js
11
bot.js
@@ -66,7 +66,7 @@ function commandsHelp(requestedCommand) {
|
|||||||
|
|
||||||
// For now abstracting this, so we can maybe use config later.
|
// For now abstracting this, so we can maybe use config later.
|
||||||
// content should be a string or something js thinks is a string :)
|
// content should be a string or something js thinks is a string :)
|
||||||
function sendToBotTestingChannel(content) {
|
function sendToBotg(content) {
|
||||||
console.log(content);
|
console.log(content);
|
||||||
client.channels.get('357365312620068874').send(content);
|
client.channels.get('357365312620068874').send(content);
|
||||||
}
|
}
|
||||||
@@ -170,7 +170,7 @@ function imgurRequest(subreddit, page_max) {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Ignore the error and let the calling method handle the empty string.
|
// Ignore the error and let the calling method handle the empty string.
|
||||||
sendToBotTestingChannel(error.message);
|
sendToBotTestingChannel('imgur:' + error.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ function asyncSiteRequest(url, process) {
|
|||||||
return process(data);
|
return process(data);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
sendToBotTestingChannel(error.message);
|
sendToBotTestingChannel('async:' + error.message);
|
||||||
return "";
|
return "";
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -255,7 +255,7 @@ function subredditRequest(subreddit) {
|
|||||||
{
|
{
|
||||||
// Ignore the error and continue.
|
// Ignore the error and continue.
|
||||||
// continue; <-- last line in the loop... so does nothing.
|
// continue; <-- last line in the loop... so does nothing.
|
||||||
sendToBotTestingChannel(error.message);
|
sendToBotTestingChannel('reddit:' + error.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (counter > 5) {
|
if (counter > 5) {
|
||||||
@@ -393,8 +393,7 @@ client.on('ready', () => {
|
|||||||
// todo this set activity returns a promise and we aren't doing anything with it
|
// todo this set activity returns a promise and we aren't doing anything with it
|
||||||
client.user.setActivity(setStatus, {type: setType})
|
client.user.setActivity(setStatus, {type: setType})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
sendToBotTestingChannel(error.message);
|
sendToBotTestingChannel('client.user.setActivity:' + error.message);
|
||||||
console.log(error.message);
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
;
|
;
|
||||||
|
Reference in New Issue
Block a user