def _set(self, ctx: commands.Context, *games: str):
"""Replaces the game list with the given list."""
games_str = ", ".join(sorted(list(games)))
await self.bot.reply(cf.question(
"You are about to replace the current game list with this:{}"
"Are you sure you want to proceed? (yes/no)".format(
cf.box(games_str))))
answer = await self.bot.wait_for_message(timeout=15,
author=ctx.message.author)
if answer is None or answer.content.lower().strip() != "yes":
await self.bot.reply("Game list not replaced.")
return
self.settings["del"] += self.settings["games"]
self.settings["games"] = list(games)
dataIO.save_json(self.settings_path, self.settings)
await self.bot.reply(cf.info("Game list replaced."))
评论列表
文章目录