SinisterRectus / Discordia

Discord API library written in Lua for the Luvit runtime environment
MIT License
712 stars 145 forks source link

Idk what to title it #372

Open Ubvta opened 1 year ago

Ubvta commented 1 year ago

I get this error:

C:\Users\beyon\Downloads\DiscordBot>luvit bot.lua 2023-02-11 06:53:42 | [INFO] | Discordia 2.11.2 2023-02-11 06:53:42 | [INFO] | Connecting to Discord... 2023-02-11 06:53:42 | [ERROR] | 401 - Unauthorized : GET https://discord.com/api/v8/users/@me 2023-02-11 06:53:42 | [ERROR] | Could not authenticate, check token: HTTP Error 0 : 401: Unauthorized

weslleyxm commented 1 year ago

There seems to be something wrong with your token

Corotyest commented 1 year ago

I highly doubt it as with persistence I get this error. In fact, it "fixes" if, on the contrary, you restart the execution, that is; running your project again.

However, I want to emphasize that this in hosting servers ends the execution and does not restart automatically, so it is a very peculiar problem.

truemedian commented 1 year ago

HTTP Error 401: Unauthorized always means you have an invalid token. Make sure that the token is prefixed with "Bot " (eg. Bot AB.CD.EF).

exatron2300 commented 1 year ago

HTTP Error 401: Unauthorized always means you have an invalid token. Make sure that the token is prefixed with "Bot " (eg. Bot AB.CD.EF).

I also have the exact same issue. I re generated my token many times, to paste it back into my code, and I still had the same issue. I also correctly added "Bot " before my token, like this : "Bot MY_TOKEN_HERE". I don't know what to do anymore