Я хочу написать дискорд бота. Нашёл код на гитхабе
https://gist.github.com/Tetraquark/911eb07052be10f... . Но он не работает, вылезает вот такая ошибка
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\http.py", line 258, in static_login
data = yield from self.request(Route('GET', '/users/@me'))
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\http.py", line 200, in request
raise HTTPException(r, data)
discord.errors.HTTPException: UNAUTHORIZED (status code: 401): 401: Unauthorized
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:/Users/user/PycharmProjects/HTML_replace/discord_bot.py", line 37, in <module>
client.run(DISCORD_BOT_TOKEN)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\client.py", line 519, in run
self.loop.run_until_complete(self.start(*args, **kwargs))
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\Lib\asyncio\base_events.py", line 467, in run_until_complete
return future.result()
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\client.py", line 490, in start
yield from self.login(*args, **kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\client.py", line 416, in login
yield from getattr(self, '_login_' + str(n))(*args, **kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\client.py", line 346, in _login_1
data = yield from self.http.static_login(token, bot=is_bot)
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\http.py", line 262, in static_login
raise LoginFailure('Improper token has been passed.') from e
discord.errors.LoginFailure: Improper token has been passed.
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x033AD7D0>
Помогите, кому не сложно.