Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Error fetching user #6

@gooddavvy

Description

@gooddavvy

@pikachub2005 Hi Pika,

This is my Node.js code:

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
`

Here's the repl I'm using, leave a comment and I'll invite you to it: https://replit.com/@GoodnessDavid/AwesomBot-Generator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions