Skip to content

Lavalink.py on Linux

Luke edited this page Dec 11, 2017 · 3 revisions

Install java

Apt based distros

Run in terminal sudo apt-get update then sudo apt-get install openjdk-8-jre

CentOS and Fedora

Run in terminal sudo yum install java-1.8.0-openjdk

Download lavalink.jar

wget https://ci.fredboat.com/repository/download/Lavalink_Build/2298:id/Lavalink.jar?guest=1

Editing state.py in the local Discord install

Run the command python3.6 -m site - when the command has completed you'll notice multiple file locations displayed, make a note of the last entry (which will probably look like /dist-packages or /site-packages)

Enter sudo nano <site/dist-packages location>/discord/state.py and scroll to line 791, and edit it to look like the following:

def parse_voice_server_update(self, data):
    self.dispatch('voice_server_update', data)
        
    try:
        key_id = int(data['guild_id'])
    except KeyError:
        key_id = int(data['channel_id'])

    vc = self._get_voice_client(key_id)
    if vc is not None:
        compat.create_task(vc._create_socket(key_id, data))
Clone this wiki locally