shop.py 文件源码

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

项目:Jumper-Cogs 作者: Redjumpman 项目源码 文件源码
def _give_shop(self, ctx, user: discord.Member, *, itemname):
        """Adds an item to a users inventory. Item must be in the shop."""
        author = ctx.message.author
        settings = self.check_server_settings(author.server)
        itemname = itemname.title()
        self.user_check(settings, user)
        if itemname in settings["Shop List"]:
            quantity = 1
            self.user_give_item(settings, user, quantity, itemname)
            msg = "{} was given {} by {}".format(user.mention, itemname, author.mention)
        else:
            msg = "No such item in the shop."
        await self.bot.say(msg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号