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.
|
||||
// content should be a string or something js thinks is a string :)
|
||||
function sendToBotTestingChannel(content) {
|
||||
function sendToBotg(content) {
|
||||
console.log(content);
|
||||
client.channels.get('357365312620068874').send(content);
|
||||
}
|
||||
@@ -170,7 +170,7 @@ function imgurRequest(subreddit, page_max) {
|
||||
}
|
||||
} catch (error) {
|
||||
// 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);
|
||||
})
|
||||
.catch(error => {
|
||||
sendToBotTestingChannel(error.message);
|
||||
sendToBotTestingChannel('async:' + error.message);
|
||||
return "";
|
||||
})
|
||||
}
|
||||
@@ -255,7 +255,7 @@ function subredditRequest(subreddit) {
|
||||
{
|
||||
// Ignore the error and continue.
|
||||
// continue; <-- last line in the loop... so does nothing.
|
||||
sendToBotTestingChannel(error.message);
|
||||
sendToBotTestingChannel('reddit:' + error.message);
|
||||
}
|
||||
|
||||
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
|
||||
client.user.setActivity(setStatus, {type: setType})
|
||||
.catch(error => {
|
||||
sendToBotTestingChannel(error.message);
|
||||
console.log(error.message);
|
||||
sendToBotTestingChannel('client.user.setActivity:' + error.message);
|
||||
});
|
||||
})
|
||||
;
|
||||
|
Reference in New Issue
Block a user