dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
684 stars 162 forks source link

[BUG] Cannot run selfbot #53

Closed Santtiago2121 closed 3 years ago

Santtiago2121 commented 3 years ago
import discord 
from discord.ext import commands

bot = commands.Bot(command_prefix='.', self_bot=True)

@bot.command()
async def ping(ctx):
    await ctx.send('pong')

try:
    bot.run("mytoken")
except Exception as e:
    print(e)

Returns error:

websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
websocket connection is closing.
list index out of range
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x034099B8>
Traceback (most recent call last):
  File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\asyncio\base_events.py", line 719, in call_soon
    self._check_closed()
  File "C:\Users\Bengali\AppData\Local\Programs\Python\Python38-32\lib\asyncio\base_events.py", line 508, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Santtiago2121 commented 3 years ago

I tryied to run the selfbot in other account and it works, but for any reason it dont works for my main account