Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] if (!note.length) note = null; #1

Closed
GhostieSpook opened this issue Oct 16, 2020 · 5 comments
Closed

[ERROR] if (!note.length) note = null; #1

GhostieSpook opened this issue Oct 16, 2020 · 5 comments

Comments

@GhostieSpook
Copy link

GhostieSpook commented Oct 16, 2020

ghostiespook@Ghosties-MacBook-Pro Discord-Sp00kbot-master % node index.js
/Users/ghostiespook/Desktop/Discord-Sp00kbot-master/node_modules/discord.js/src/client/websocket/packets/handlers/Ready.js:41
        if (!note.length) note = null;
                  ^

TypeError: Cannot read property 'length' of null
    at ReadyHandler.handle (/Users/ghostiespook/Desktop/Discord-Sp00kbot-master/node_modules/discord.js/src/client/websocket/packets/handlers/Ready.js:41:19)
    at WebSocketPacketManager.handle (/Users/ghostiespook/Desktop/Discord-Sp00kbot-master/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:108:65)
    at WebSocketConnection.onPacket (/Users/ghostiespook/Desktop/Discord-Sp00kbot-master/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:336:35)
    at WebSocketConnection.onMessage (/Users/ghostiespook/Desktop/Discord-Sp00kbot-master/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:299:17)
    at WebSocket.onMessage (/Users/ghostiespook/Desktop/Discord-Sp00kbot-master/node_modules/ws/lib/event-target.js:120:16)
    at WebSocket.emit (events.js:314:20)
    at Receiver.receiverOnMessage (/Users/ghostiespook/Desktop/Discord-Sp00kbot-master/node_modules/ws/lib/websocket.js:789:20)
    at Receiver.emit (events.js:314:20)
    at Receiver.dataMessage (/Users/ghostiespook/Desktop/Discord-Sp00kbot-master/node_modules/ws/lib/receiver.js:413:14)
    at Receiver.getData (/Users/ghostiespook/Desktop/Discord-Sp00kbot-master/node_modules/ws/lib/receiver.js:352:17)
ghostiespook@Ghosties-MacBook-Pro Discord-Sp00kbot-master %
@hanahaneull
Copy link
Owner

This is discord.js problem when you tried to login with user token.

FIX

  1. open node_modules folder
  2. open discord.js folder
  3. open src folder
  4. open client folder
  5. open websocket folder
  6. open packets folder
  7. open handler folder
  8. open Ready.js file with notepad or your favorite text editor (Right click and open with...)
  9. Goto line 41 or CTRL + F if (!note.length) note = null;
  10. change to //if (!note.length) note = null;
  11. And save (CTRL + S)

@hanahaneull hanahaneull changed the title Im not the best at understanding error messages. Think you can help? Thought I had everything correctly. [ERROR] if (!note.length) note = null; Oct 16, 2020
@hanahaneull hanahaneull pinned this issue Oct 16, 2020
@GhostieSpook
Copy link
Author

Sweet. Works now. Also, one question Is multi-server support a thing. if no that's fine. Just wondering.

@hanahaneull
Copy link
Owner

Yeah, I can work on that. For now just run multiple client to have multi-server support.

@hanahaneull
Copy link
Owner

@GhostieSpook just pushed new update for multi-server support ^^

@GhostieSpook
Copy link
Author

GhostieSpook commented Oct 16, 2020

Damn you're fast keep up the amazing work <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants