Guest User

Untitled

a guest
Dec 10th, 2021
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.10 KB | None | 0 0
  1. Error:
  2. C:\Users\Szymon\Desktop\MauBot\venv\lib\site-packages\discord\ext\commands\core.py:85: DeprecationWarning: logout is deprecated, use Client.close instead.
  3.   ret = await coro(*args, **kwargs)
  4. Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000002B390057F40>
  5. Traceback (most recent call last):
  6.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
  7.     self.close()
  8.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
  9.     self._loop.call_soon(self._call_connection_lost, None)
  10.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
  11.     self._check_closed()
  12.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
  13.     raise RuntimeError('Event loop is closed')
  14. RuntimeError: Event loop is closed
  15. Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000002B390057F40>
  16. Traceback (most recent call last):
  17.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
  18.     self.close()
  19.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
  20.     self._loop.call_soon(self._call_connection_lost, None)
  21.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
  22.     self._check_closed()
  23.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
  24.     raise RuntimeError('Event loop is closed')
  25. RuntimeError: Event loop is closed
  26. Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000002B390057F40>
  27. Traceback (most recent call last):
  28.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
  29.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
  30.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
  31.   File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
  32. RuntimeError: Event loop is closed
  33.  
  34.  
  35.  
  36. Code:
  37. @client.command(name='restart', alliases=['restart'])
  38. async def Restart(ctx):
  39.         if ctx.author.id in teamid:
  40.             await ctx.send(f'Bot zostanie zresetowany w przeciągu 5 sekund', delete_after=0.5)
  41.             await asyncio.sleep(0.5)
  42.             await ctx.send('Restartowanie...', delete_after=1)
  43.             try:
  44.                 await client.logout()
  45.             except EnvironmentError as e:
  46.                 print(e)
  47.                 client.clear()
  48.             await ctx.send('Bot został zresetowany pomyślnie')
  49.         else:
  50.             ctx.send(f'Użyłeś komendy która jest przeznaczona tylko dla niektórych osób')
  51.             ctx.send(f'Jeżeli sytuacja się powtórzy jeszcze kilka razy możesz dostać gbana')
Advertisement
Add Comment
Please, Sign In to add comment