You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
so far everything works. Even test.js works.
No I am facing a problem, when I run the following code.
I get following error: SyntaxError: await is only valid in async function
Hi,
so far everything works. Even test.js works.
No I am facing a problem, when I run the following code.
I get following error: SyntaxError: await is only valid in async function
Thank you very much.
****************** CODE *********************
'use strict';
const {expect} = require('chai');
const ChaturbateBrowser = require('../index');
const username = 'XXX';
const cb = new ChaturbateBrowser();
cb.on('init', async (e) => {
console.dir(e.settings);
console.dir(e.chatSettings);
console.dir(e.initializerSettings);
console.log(e.csrftoken);
console.log(e.hasWebsocket);
console.log(await cb.fetch(
/api/panel/${e.settings.room}/
));});
cb.on('message', (e) => {
console.log(e.timestamp);
console.log(e.method);
console.dir(e.args);
});
await cb.start();
cb.profile(username);
setTimeout(() => cb.stop(), 10 * 1000);
The text was updated successfully, but these errors were encountered: