getPenalty

open override fun getPenalty(node: LavalinkNode, region: VoiceRegion?): Int

Calculate the penalty for the provider.

Return value should never exceed MAX_ERROR. Lower means to take preference.

Return

A number between 0 and MAX_ERROR (inclusive), using numbers outside of this range may cause errors.

Parameters

node

The lavalink node to calculate the penalty for.

region

The preferred voice region for the node, null if not specified.