Closed somboytiger closed 1 year ago
ManagerUtils is a class and you can only access it's non-static methods, like buildTrack, after initializing the class.
const utils = new ManagerUtils(manager);
utils.buildTrack()
or just do
client.lavalink.utils.buildTrack()
cause ManagerUtils already exists on LavalinkManager class...
Here is an example:
const { LavalinkManager, ManagerUtils } = require("lavalink-client");
client.lavalink = new LavalinkManager({ ...YourLavalinkManagerOptions });
// now access the ManagerUtils
client.lavalink.utils.buildTrack(trackData, requesterUser);
// create your own utils class
client.managerUtils = new ManagerUtils(client.lavalink) // useless... cause you can just do client.lavalink.utils!
However, I don't know why you need to exec. buildTrack?
-> the methods: player.search()
, player.nodedecode.singleTrack()
, player.node.decode.multipleTracks()
, and player.lavaSearch()
all return already builded Tracks, which means the manager executes buildTrack internally.
var { ManagerUitls } = require(
lavalink-client
) buildTrackTypeError: ManagerUitls.buildTrack is not a function