oshimen.py 文件源码

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

项目:YukirinCogs 作者: skeith 项目源码 文件源码
def supporttype(self, ctx, *, support_type):
        """How devoted are you?
        Support types are : Kami-Oshi, Oshi, DD or Daredemo Daisuki,
         MD or Minna Daisuki or write anything you like"""

        server = ctx.message.server
        user = ctx.message.author
        prefix = ctx.prefix

        if server.id not in self.oshi:
            self.oshi[server.id] = {}
        else:
            pass

        if user.id not in self.oshi[server.id]:
            data = discord.Embed(colour=discord.Color(0xffb6c1))
            data.add_field(
                name="Gomen ne~!",
                value=("You'll need to apply for an Oshimen card to use") +
                (" this feature. Type {}wota").format(prefix) +
                (" to apply for one."))
            await self.bot.say(embed=data)
        else:
            self.oshi[server.id][user.id].update(
                {"Support Type": support_type})
            dataIO.save_json(OJSON, self.oshi)
            data = discord.Embed(colour=discord.Color(0xffb6c1))
            data.add_field(name="Arigatou! :bow:",
                           value=("We are very grateful of your support. ") +
                           ("The support type {} ").format(support_type) +
                           ("has been saved"))
            await self.bot.say(embed=data)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号