Skip to content

Instantly share code, notes, and snippets.

@commands.command(name="lyrics", aliases=['searchlyrics','ls'])
@commands.cooldown(1.0, 5.0, commands.BucketType.user)
async def _lyrics(self, ctx, artist: str, *, song: str):
"""(Patreon only) Reveals a lyrics text for a song"""
if ctx.author.id in self.patrons:
try:
try:
async with self.session.get(f"https://orion.apiseeds.com/api/music/lyric/{artist}/{song}?apikey={self.lyricskey}") as resp:
data = await resp.json()
await ctx.send(embed=discord.Embed(color=0x170041).add_field(name=":page_facing_up: Lyrics text", value=f"```fix\n{data['result']['track'].get('text')}```"))