heroku deployment, libopus not found

后端 未结 3 1268
孤独总比滥情好
孤独总比滥情好 2021-01-17 01:24

I am trying to host a discord music bot in heroku, but even if it works fine in my local machine, it doesnt seem to be able to find the libopus library deployed.

He

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-17 01:39

    I had this issue, and now have a functioning music bot with heroku. Add this buildpack https://github.com/xrisk/heroku-opus.git and then redeploy your bot and restart the dyno. This should fix the error. If that still doesn't work then try adding to the start of your code

    if not discord.opus.is_loaded():
        # the 'opus' library here is opus.dll on windows
        # or libopus.so on linux in the current directory
        # you should replace this with the location the
        # opus library is located in and with the proper filename.
        # note that on windows this DLL is automatically provided for you
        discord.opus.load_opus('opus')
    

提交回复
热议问题