def _clear_shop(self, ctx):
"""Wipes the entire shop list"""
user = ctx.message.author
settings = self.check_server_settings(user.server)
shop_name = settings["Config"]["Shop Name"]
await self.bot.say("Do you want to wipe the entire shop list? "
"You cannot undue this action.")
choice = await self.bot.wait_for_message(timeout=15, author=user)
if choice is None:
msg = "Cancelling shop wipe."
elif choice.content.title() == "No":
msg = "Cancelling shop wipe."
elif choice.content.title() == "Yes":
settings["Shop List"] = {}
dataIO.save_json(self.file_path, self.system)
msg = "The shop list has been cleared from the {} Shop".format(shop_name)
else:
msg = "Improper response. Cancelling shop wipe."
await self.bot.say(msg)
评论列表
文章目录