@commands.command(name='play', aliases=['p', 'sing'])
async def play(self, ctx, *, query):
    player = self.bot.lavalink.player_manager.get(ctx.guild.id)
    query = query.strip('<>')
    if (not query.startswith('http')):
        query = f'ytsearch:{query}'
    results = (await player.node.get_tracks(query))
    if ((not results) or (not results['tracks'])):
        return (await ctx.send('Song not found :x: Please try again :mag_right:'))
    em = discord.Embed(colour=discord.Colour(5898184))
    if (results['loadType'] == 'PLAYLIST_LOADED'):
        tracks = results['tracks']
        for track in tracks:
            player.add(requester=ctx.author.id, track=track)
        em.title = 'Playlist Enqueued!'
        em.description = f"{results['playlistInfo']['name']} - {len(tracks)} tracks"
    else:
        track = results['tracks'][0]
        em.title = 'Track Enqueued'
        em.description = f"[{track['info']['title']}]({track['info']['uri']})"
        em.set_thumbnail(url=f"http://i.ytimg.com/vi/{track['info']['identifier']}/hqdefault.jpg")
        em.add_field(name='Channel', value=track['info']['author'])
        if track['info']['isStream']:
            duration = 'Live'
        else:
            duration = lavalink.format_time(track['info']['length']).lstrip('00:')
        em.add_field(name='Duration', value=duration)
        track = lavalink.models.AudioTrack(track, ctx.author.id, recommended=True)
        player.add(requester=ctx.author.id, track=track)
    msg = (await ctx.send(embed=em))
    if (not player.is_playing):
        (await player.play())
        (await player.reset_equalizer())
        (await msg.delete(delay=1))
        (await self.now(ctx))
        (await self.bot.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=player.current.title)))
@commands.command(name='play', aliases=['p', 'sing'])
async def play(self, ctx, *, query):
    player = self.bot.lavalink.player_manager.get(ctx.guild.id)
    query = query.strip('<>')
    if (not query.startswith('http')):
        query = f'ytsearch:{query}'
    results = (await player.node.get_tracks(query))
    if ((not results) or (not results['tracks'])):
        return (await ctx.send('Song not found :x: Please try again :mag_right:'))
    em = discord.Embed(colour=discord.Colour(5898184))
    if (results['loadType'] == 'PLAYLIST_LOADED'):
        tracks = results['tracks']
        for track in tracks:
            player.add(requester=ctx.author.id, track=track)
        em.title = 'Playlist Enqueued!'
        em.description = f"{results['playlistInfo']['name']} - {len(tracks)} tracks"
    else:
        track = results['tracks'][0]
        em.title = 'Track Enqueued'
        em.description = f"[{track['info']['title']}]({track['info']['uri']})"
        em.set_thumbnail(url=f"http://i.ytimg.com/vi/{track['info']['identifier']}/hqdefault.jpg")
        em.add_field(name='Channel', value=track['info']['author'])
        if track['info']['isStream']:
            duration = 'Live'
        else:
            duration = lavalink.format_time(track['info']['length']).lstrip('00:')
        em.add_field(name='Duration', value=duration)
        track = lavalink.models.AudioTrack(track, ctx.author.id, recommended=True)
        player.add(requester=ctx.author.id, track=track)
    msg = (await ctx.send(embed=em))
    if (not player.is_playing):
        (await player.play())
        (await player.reset_equalizer())
        (await msg.delete(delay=1))
        (await self.now(ctx))
        (await self.bot.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=player.current.title)))