问题描述
因此,我试图执行一个命令来重新启动Discord机器人,但出现了我无法理解的错误,请帮帮我。我真的不知道该怎么办
@bot.command(name = "restart",aliases = ["r"],help = "Restarts the bot.")
async def restart(ctx):
embed = discord.Embed(
title = f"{bot.user.name} Restarting!",color = bot.embed_color,timestamp = datetime.datetime.now(datetime.timezone.utc)
)
embed.set_footer(
text = bot.footer,icon_url = bot.footer_image
)
await bot.log_channel.send(embed = embed)
await ctx.message.add_reaction('✅')
await bot.logout()
这是我收到的错误消息
Traceback (most recent call last):
File "C:\Python86\lib\asyncio\proactor_events.py",line 116,in __del__
self.close()
File "C:\Python86\lib\asyncio\proactor_events.py",line 108,in close
self._loop.call_soon(self._call_connection_lost,None)
File "C:\Python86\lib\asyncio\base_events.py",line 719,in call_soon
self._check_closed()
File "C:\Python86\lib\asyncio\base_events.py",line 508,in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x0000017711E99550>
Traceback (most recent call last):
File "C:\Python86\lib\asyncio\proactor_events.py",in __del__
File "C:\Python86\lib\asyncio\proactor_events.py",in close
File "C:\Python86\lib\asyncio\base_events.py",in call_soon
File "C:\Python86\lib\asyncio\base_events.py",in _check_closed
RuntimeError: Event loop is closed
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)