Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

websocket: close 4004: Authentification failed / websocket: close 4014: Disallowed Intent(s) error. [BOT login] #288

Closed
1 of 5 tasks
lukalafaye opened this issue Jun 24, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@lukalafaye
Copy link

How have you installed cordless

  • Arch User Repository
  • Snap
  • scoop
  • brew
  • go get

What happened

Tried logging in via Authentification-Token with a bot using: BOT MY.BOT.TOKEN and got a websocket: close 4004: Authentification failed error.

Then I made a config.json file in /data/data/com.termux/files/home/.config/cordless/ with the following content (got it from my laptop):

{
    "Token": "Bot MY.BOT.TOKEN}",
    "Autocomplete": true,
    "Times": 0,
    "UseRandomUserColors": false,
   
 
 "FocusChannelAfterGuildSelection": true,
    "FocusMessageInputAfterChannelSelection": true,
   
 
"ShowUserContainer": true,
    "UseFixedLayout": false,
    "FixedSizeLeft": 12,
    "FixedSizeRight": 12,
   
 
"OnTypeInListBehaviour": 1,
    "MouseEnabled": true,
    "ShortenLinks": false,
    "ShortenerPort": 63212,
   
 
"DesktopNotifications": true,
    "ShowPlaceholderForBlockedMessages": true,
    "ShowUpdateNotifications": true,
 
 
  "DontShowUpdateNotificationFor": "",
    "Accounts": null,
    "IndicateChannelAccessRestriction": false,
   
 
"ShowBottomBar": true
}

When I launched cordless, I got another error (see error output).

How do you reproduce this bug

I installed cordless on Termux (you can get the app in Android's default playstore). Using an Asus flip chromebook c302ca.
Note: to paste the token while cordless is running in Termux, long clicking won't work and I had to use Ctrl+Alt+A.

Error output

websocket: close 4014: Disallowed Intent(s) error.
image

How to fix

https://discord.com/developers/docs/topics/opcodes-and-status-codes might help?

4004 | Authentication failed | The account token sent with your identify payload is incorrect (I have double checked my token and even tried regenerating it)

4014 | Disallowed intent(s) | You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not enabled or are not whitelisted for.

System information

Key Value
OS Chrome OS
Architechture amd64
@Bios-Marcel
Copy link
Owner

Oh, i think i broke this recently, as discord has made changes to the APIs. Seems I have to add specific code for bots for the intents. Thanks for reporting.

@Bios-Marcel Bios-Marcel added the bug Something isn't working label Jun 24, 2020
@lukalafaye
Copy link
Author

No problem! I think it works fine on my laptop though (bot login too).

@lukalafaye
Copy link
Author

lukalafaye commented Jun 26, 2020

I am still getting the websocket: close 4004: Authentification failed error after competely reinstalling cordless. The changes you made were updated. EDIT: I had to regenerate my token and it solved the problem. I tried making a new bot and got the error once again. regenerating the bot's token did not work this time. Looks like the first error issue was not fixed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants