dotabase.py 文件源码

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

项目:MangoByte 作者: mdiller 项目源码 文件源码
def emoticon(self, ctx, name):
        """Gets the gif of a dota emoticon

        **Examples:**
        `{cmdpfx}emoticon pup`
        `{cmdpfx}emoticon stunned`
        `{cmdpfx}emoticon naga_song"""
        await ctx.channel.trigger_typing()

        emoticon = session.query(Emoticon).filter(Emoticon.name == name).first()

        if not emoticon:
            raise UserError(f"Couldn't find an emoticon with the name '{name}'")

        url = self.vpkurl + emoticon.url
        image = discord.File(await drawdota.create_dota_emoticon(emoticon, url), f"{name}.gif")

        await ctx.send(file=image)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号