shop.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号