attempt fix defaultbot detection

This commit is contained in:
RossAscends
2023-06-29 20:37:41 +09:00
parent 5d1edf7456
commit 05fd6d4a6c

View File

@@ -405,7 +405,6 @@ 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 +425,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;