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)
评论列表
文章目录