MainSilent / Discord-Screenshare

First ever discord video screenshare SELFBOT
298 stars 80 forks source link

Error [TOKEN_INVALID]: An invalid token was provided. #53

Closed ExclusiveRishi closed 2 years ago

ExclusiveRishi commented 2 years ago
$ node main.js
Webdriver started
/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:129
    const invalidToken = new Error(WSCodes[4004]);
                         ^

Error [TOKEN_INVALID]: An invalid token was provided.
    at WebSocketManager.connect (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/websocket/WebSocketManager.js:129:26)
    at Client.login (/Discord-Screenshare/node_modules/discord.js-selfbot-v13/src/client/Client.js:335:21)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  [Symbol(code)]: 'TOKEN_INVALID'
}

Node.js v17.9.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c yarn start' returned a non-zero code: 1

I have set token in .env, made Dockerfile overwrite existing .env with

RUN echo "token={my_token}" > .env

and Manually replaced main.js line 13 with const token = "{token}"

COPY main.js .

instead of

COPY .env .

And I'm still getting the same issue!

MainSilent commented 2 years ago

If you are sure about the token validity, Ask the issue on discord.js-selfbot-v13 repository.