var Client = require('replapi-it');
var client = new Client(process.env.CONNECT_SID_COOKIE);
client.on('ready', async () => {
let user = await client.users.fetch('GoodnessDavid');
console.log(user.followerCount);
})
However, when I run it, it says:
`
/home/runner/AwesomBot-Generator/node_modules/replapi-it/src/index.js:41
if (!data[0].currentUser) throw new Error('SID is invalid');
^
TypeError: Cannot read properties of undefined (reading 'currentUser')
at /home/runner/AwesomBot-Generator/node_modules/replapi-it/src/index.js:41:17
Node.js v18.12.1
repl process died unexpectedly: exit status 1
`
@pikachub2005 Hi Pika,
This is my Node.js code:
However, when I run it, it says:
` /home/runner/AwesomBot-Generator/node_modules/replapi-it/src/index.js:41 if (!data[0].currentUser) throw new Error('SID is invalid'); ^
TypeError: Cannot read properties of undefined (reading 'currentUser') at /home/runner/AwesomBot-Generator/node_modules/replapi-it/src/index.js:41:17
Node.js v18.12.1 repl process died unexpectedly: exit status 1 `
Here's the repl I'm using, leave a comment and I'll invite you to it: https://replit.com/@GoodnessDavid/AwesomBot-Generator