shop.py 文件源码

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

项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码
def _sort_setshop(self, ctx, choice: str):
        """Changes the sorting method for shop listings. Alphabetical, Lowest, Highest"""
        server = ctx.message.server
        settings = self.check_server_settings(server)
        choice = choice.title()
        if choice == "Alphabetical":
            settings["Config"]["Sort Method"] = "Alphabet"
            dataIO.save_json(self.file_path, self.system)
            msg = "Changing sorting method to Alphabetical."
        elif choice == "Lowest":
            settings["Config"]["Sort Method"] = "Lowest"
            dataIO.save_json(self.file_path, self.system)
            msg = "Setting sorting method to Lowest."
        elif choice == "Highest":
            settings["Config"]["Sort Method"] = "Highest"
            dataIO.save_json(self.file_path, self.system)
            msg = "Setting sorting method to Highest."
        else:
            msg = "Please choose Alphabet, Lowest, or Highest."
        await self.bot.say(msg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号