파이썬으로 디스코드 봇 만드는데 이렇게 오류 뜨네요 도와주세요

조회수 1322회

cmd에서 run.py하면 어느정도는 실행이 되는데요

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\owner\Desktop\run.py", line 17, in <module>
    client.run('NzkyMzM2MTc3NDM5OTY1MTg0.X-cOkQ.EjIWejkMUJb3xQjFThDblHrAz-8')
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\discord\client.py", line 708, in run
    return future.result()
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\discord\client.py", line 687, in runner
    await self.start(*args, **kwargs)
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\discord\client.py", line 650, in start
    await self.login(*args, bot=bot)
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\discord\client.py", line 499, in login
    await self.http.static_login(token.strip(), bot=bot)
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\discord\http.py", line 291, in static_login
    data = await self.request(Route('GET', '/users/@me'))
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\discord\http.py", line 185, in request
    async with self.__session.request(method, url, **kwargs) as r:
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\aiohttp\client.py", line 1012, in __aenter__
    self._resp = await self._coro
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\aiohttp\client.py", line 480, in _request
    conn = await self._connector.connect(
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\aiohttp\connector.py", line 523, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\aiohttp\connector.py", line 858, in _create_connection
    _, proto = await self._create_direct_connection(
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\aiohttp\connector.py", line 1004, in _create_direct_connection
    raise last_exc
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\aiohttp\connector.py", line 980, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "C:\Users\owner\AppData\Roaming\Python\Python38\site-packages\aiohttp\connector.py", line 938, in _wrap_create_connection
    raise ClientConnectorCertificateError(
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1124)')]

이렇게 뜨네요

참고로 저는 이렇게 코드 짰습니다

import discord

client = discord.Client()

@client.event
async def on_ready():
    print('We have logged in as {0.user} '.format(client))

@client.event
async def on_message(message):
    if message.author == client.user:
        return

    if message.content.startswith('!ping'):
        await message.channel.send('pog')

client.run('뿅뿅토큰')
  • 토큰을 잉터넷에 그대로 올리면 디스코드 크롤러가 보고 깜짝 놀래서 토큰을 강제로 바꿔버리니, 우측 상단에 편집 요청 확인하시고 적용하세요. 편집요청빌런 2020.12.26 21:45
  • 알 수 없는 사용자 2020.12.26 21:51

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)