def __init__(self, bot):
    self.bot = bot
    self.kclient = bot.kclient
    if (not hasattr(bot, 'lavalink')):
        bot.lavalink = lavalink.Client(bot.user.id)
        bot.lavalink.add_node('localhost', 1616, 'proto', 'in', 'default-node')
        bot.add_listener(bot.lavalink.voice_update_handler, 'on_socket_response')
    lavalink.add_event_hook(self.track_hook)
def __init__(self, bot):
    self.bot = bot
    self.kclient = bot.kclient
    if (not hasattr(bot, 'lavalink')):
        bot.lavalink = lavalink.Client(bot.user.id)
        bot.lavalink.add_node('localhost', 1616, 'proto', 'in', 'default-node')
        bot.add_listener(bot.lavalink.voice_update_handler, 'on_socket_response')
    lavalink.add_event_hook(self.track_hook)