def run(self):
self._interaction = asyncio.ensure_future(self._game_screen.interact(timeout=None, delete_after=False))
self._runner = asyncio.ensure_future(self.run_loop())
# await self._game_screen.wait_until_ready()
try:
return await self._runner
finally:
# For some reason having all these games hanging around causes lag.
# Until I properly make a delete_after on the paginator I'll have to
# settle with this hack.
async def task():
await asyncio.sleep(30)
with contextlib.suppress(discord.HTTPException):
await self._game_screen._message.delete()
self.ctx.bot.loop.create_task(task())
self._interaction.cancel()
评论列表
文章目录