Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Error:
- C:\Users\Szymon\Desktop\MauBot\venv\lib\site-packages\discord\ext\commands\core.py:85: DeprecationWarning: logout is deprecated, use Client.close instead.
- ret = await coro(*args, **kwargs)
- Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000002B390057F40>
- Traceback (most recent call last):
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
- self.close()
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
- self._loop.call_soon(self._call_connection_lost, None)
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
- self._check_closed()
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
- raise RuntimeError('Event loop is closed')
- RuntimeError: Event loop is closed
- Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000002B390057F40>
- Traceback (most recent call last):
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
- self.close()
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
- self._loop.call_soon(self._call_connection_lost, None)
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
- self._check_closed()
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
- raise RuntimeError('Event loop is closed')
- RuntimeError: Event loop is closed
- Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000002B390057F40>
- Traceback (most recent call last):
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
- File "C:\Users\Szymon\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
- RuntimeError: Event loop is closed
- Code:
- @client.command(name='restart', alliases=['restart'])
- async def Restart(ctx):
- if ctx.author.id in teamid:
- await ctx.send(f'Bot zostanie zresetowany w przeciągu 5 sekund', delete_after=0.5)
- await asyncio.sleep(0.5)
- await ctx.send('Restartowanie...', delete_after=1)
- try:
- await client.logout()
- except EnvironmentError as e:
- print(e)
- client.clear()
- await ctx.send('Bot został zresetowany pomyślnie')
- else:
- ctx.send(f'Użyłeś komendy która jest przeznaczona tylko dla niektórych osób')
- 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