diff --git a/src/poe-client.js b/src/poe-client.js index f67f6bd64..f24972ef6 100644 --- a/src/poe-client.js +++ b/src/poe-client.js @@ -405,7 +405,8 @@ class Client { const viewerPath = findKey(nextData, viewerKeyName); const botNamePath = findKey(nextData, botNameKeyName); const defaultBotPath = findKey(nextData, defaultBotKeyName); - console.log(`DefaultBot found at: ${defaultBotPath.join('.')}`) + + let viewer = null; if (viewerPath) { @@ -426,6 +427,13 @@ class Client { //console.log(logObjectStructure(nextData, 0, 2)); } + if (defaultBotPath) { + console.log(`'${defaultBotKeyName}' key: ${defaultBotPath.join('.')}`); + } else { + console.log(`ERROR: '${defaultBotKeyName}' key not found.`); + //console.log(logObjectStructure(nextData, 0, 2)); + } + this.formkey = extractFormKey(r.data); this.viewer = viewer;