DiscordのBOTを作っている人でわけのわからない長文のエラーに困っています。
エラーの意味を教えてほしいです。
テキストファイルからBOTのTOKENを読み取っているのですがそれがよくないのでしょうか?
Traceback (most recent call last): File "C:\Users\ユーザー名\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\gateway.py", line 468, in poll_event msg = await self.recv() File "C:\Users\ユーザー名\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\protocol.py", line 350, in recv yield from self.ensure_open() File "C:\Users\ユーザー名\AppData\Local\Programs\Python\Python37\lib\site-packages\websockets\protocol.py", line 512, in ensure_open self.close_code, self.close_reason) from self.transfer_data_exc websockets.exceptions.ConnectionClosed: WebSocket connection is closed: code = 4004 (private use), reason = Authentication failed. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "Conect.py", line 47, in <module> client.run(TOKEN) File "C:\Users\ユーザー名\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 598, in run return future.result() File "C:\Users\ユーザー名\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 579, in runner await self.start(*args, **kwargs) File "C:\Users\ユーザー名\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 543, in start await self.connect(reconnect=reconnect) File "C:\Users\ユーザー名\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 457, in connect await self._connect() File "C:\Users\ユーザー名\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 421, in _connect await self.ws.poll_event() File "C:\Users\ユーザー名\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\gateway.py", line 476, in poll_event raise ConnectionClosed(exc, shard_id=self.shard_id) from exc discord.errors.ConnectionClosed: WebSocket connection is closed: code = 4004 (private use), reason = Authentication failed.
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/12/26 11:36