attempt fix defaultbot detection

This commit is contained in:
RossAscends
2023-06-29 20:38:01 +09:00
parent fcc6448d7a
commit 466bcd8833

View File

@@ -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;