I should be doing everything correctly, but it comes up with a stupidly long error message. I just started learning coding, so I have no idea what’s going on.
"Traceback (most recent call last):
File “/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/http.py”, line 293, in static_login
data = await self.request(Route(‘GET’, ‘/users/@me’))
File “/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/http.py”, line 247, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “main.py”, line 18, in
client.run(os.getenv(‘TOKEN’))
File “/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py”, line 718, in run
return future.result()
File “/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py”, line 697, in runner
await self.start(*args, **kwargs)
File “/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py”, line 660, in start
await self.login(*args, bot=bot)
File “/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py”, line 509, in login
await self.http.static_login(token.strip(), bot=bot)
File “/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/http.py”, line 297, in static_login
raise LoginFailure(‘Improper token has been passed.’) from exc
discord.errors.LoginFailure: Improper token has been passed."