CreepPork / Apollo

Discord bot that allows to get status updates on your Arma 3 server.
MIT License
17 stars 8 forks source link

Error: Incorrect login details were provided. #152

Closed TheRealAlexV closed 3 years ago

TheRealAlexV commented 3 years ago

Receiving the following error on npm start after building and configuring my .env file.

PS C:\Arma3\Apollo> npm start

> apollo@2.2.0 start
> node .

Error: Incorrect login details were provided.
    at WebSocketConnection.<anonymous> (C:\Arma3\Apollo\node_modules\discord.js\src\client\ClientManager.js:48:41)
    at Object.onceWrapper (node:events:434:26)
    at WebSocketConnection.emit (node:events:327:20)
    at WebSocketConnection.EventEmitter.emit (node:domain:486:12)
    at WebSocketConnection.onClose (C:\Arma3\Apollo\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:390:10)
    at WebSocket.onClose (C:\Arma3\Apollo\node_modules\ws\lib\event-target.js:124:16)
    at WebSocket.emit (node:events:327:20)
    at WebSocket.EventEmitter.emit (node:domain:486:12)
    at WebSocket.emitClose (C:\Arma3\Apollo\node_modules\ws\lib\websocket.js:191:10)
    at TLSSocket.socketOnClose (C:\Arma3\Apollo\node_modules\ws\lib\websocket.js:850:15)
    at TLSSocket.emit (node:events:339:22)
    at TLSSocket.EventEmitter.emit (node:domain:486:12)
    at node:net:656:12
    at TCP.done (node:_tls_wrap:563:7)
C:\Arma3\Apollo\node_modules\discord.js\src\client\ClientManager.js:48
        if (event.code === 4004) reject(new Error(Constants.Errors.BAD_LOGIN));
                                        ^

Error: Incorrect login details were provided.
    at WebSocketConnection.<anonymous> (C:\Arma3\Apollo\node_modules\discord.js\src\client\ClientManager.js:48:41)
    at Object.onceWrapper (node:events:434:26)
    at WebSocketConnection.emit (node:events:327:20)
    at WebSocketConnection.EventEmitter.emit (node:domain:486:12)
    at WebSocketConnection.onClose (C:\Arma3\Apollo\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:390:10)
    at WebSocket.onClose (C:\Arma3\Apollo\node_modules\ws\lib\event-target.js:124:16)
    at WebSocket.emit (node:events:327:20)
    at WebSocket.EventEmitter.emit (node:domain:486:12)
    at WebSocket.emitClose (C:\Arma3\Apollo\node_modules\ws\lib\websocket.js:191:10)
    at TLSSocket.socketOnClose (C:\Arma3\Apollo\node_modules\ws\lib\websocket.js:850:15)
    at TLSSocket.emit (node:events:339:22)
    at TLSSocket.EventEmitter.emit (node:domain:486:12)
    at node:net:656:12
    at TCP.done (node:_tls_wrap:563:7)
npm ERR! code 1
npm ERR! path C:\Arma3\Apollo
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c "node ."

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\*********\AppData\Local\npm-cache\_logs\2020-10-30T13_50_59_820Z-debug.log
PS C:\Arma3\Apollo>

My ENV:

IP=xx.xxx.xxx.xxx
DISPLAY_IP=xx.xxx.xxx.xxx
PORT=2302

COLOR_OK=3779158
COLOR_ERROR=14370117
COLOR_MAINTENANCE=2526162

LOCALE=en

REFRESH_COMMAND="!a info"
REFRESH_FORCE_COMMAND="!a info force"
LIMIT_REFRESH_FORCE_TO_MANAGER=true
REPLY_DM_ON_NO_PERMS=false

MAINTENANCE_TOGGLE_COMMAND="!a maint"

REACTION_MESSAGE_ID=
REACTION_ROLE_ID=
REACTION_EMOJI=🚨
MINIMUM_PLAYER_COUNT_FOR_PING=6
TIMEOUT_BETWEEN_PLAYER_PINGS_IN_MINUTES=40

CHANNEL_ID=xxxxxxxxxxxxxxxxxxx
SERVER_MANAGER_ROLE_ID=Xxxxxxxxxxxxxxxxxx

TIME_TO_CHECK_MINUTES=1

MAXIMUM_REFRESH_FAILURES=3

SENTRY_DSN=

SECRET=xxxxxxxxxxxxx

I don't see anywhere to define the discord bot API tokens. Where do I do that?

CreepPork commented 3 years ago

This is a misconfiguration error.

You need to create a Bot on Discord and in the Bot tab you need the Token.

Log into the Developer portal here https://discord.com/developers/applications create the bot and get the Bot token. With that Apollo will be able to work.

CreepPork commented 3 years ago

Closing as a misconfiguration, feel free to re-open if the issue persists.