Forums

Discord bot not working? Connection refused!!

So i have a discord bot that i know works because i copied it off of my PC. When i try and run it through this free service, i get this error:

Traceback (most recent call last):
  File "/home/sheepie/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('162.159.135.232', 443)

Anyone know why this is happening? If so how to fix it? Thanks!

https://help.pythonanywhere.com/pages/403ForbiddenError/

.

See the link posted by @sboyd