A-Kimpton / go-kimpton-dclonetracker

A discord bot for getting dclone alerts
2 stars 3 forks source link

Websocket panic issue #1

Closed Dalton3D closed 1 year ago

Dalton3D commented 2 years ago

Hello,

Please forgive me is this is an easy fix, I've never used GO before. I was able to build successfully, and also created my discord bot in the developer portal and got a token. When I run the server.exe command with my token, I get this:

C:\Users\<username>\Desktop\go-kimpton-dclonetracker-main>.\server.exe -discordtoken='<token_from_discord>'
panic: websocket: close 4004: Authentication failed.

goroutine 1 [running]:
kimpton.io/dclonetracker/discord.ConnectToDiscord({0xc00001819e?, 0xc00005a3d0?})
        C:/Users/<username>/Desktop/go-kimpton-dclonetracker-main/discord/connect.go:34 +0x218
main.main()
        C:/Users/<username>/Desktop/go-kimpton-dclonetracker-main/cmd/discordbot/server.go:18 +0x69

StackOverflow seems to think it might be how it's reading the token? It also might be something on the Discord verification end too. Please let me know if there's anything additional I should provide, or if you can see any glaring issues with what I'm running.

A-Kimpton commented 2 years ago

Are you sure you're using the correct token? - I'm currently away from my dev environment for a few days - but looking at the response of panic: websocket: close 4004: Authentication failed. sounds like you failed to authenticate.

Do not include the < > symbols in the command too