ManagerUtils
Constructors
new ManagerUtils()
new ManagerUtils(LavalinkManager?: LavalinkManager): ManagerUtils
Parameters
Parameter | Type |
---|---|
LavalinkManager ? | LavalinkManager |
Returns
Defined in
Properties
Property | Modifier | Type | Default value | Defined in |
---|---|---|---|---|
LavalinkManager | public | LavalinkManager | null | src/structures/Utils.ts:45 |
Methods
buildPluginInfo()
buildPluginInfo(data: any, clientData: any): any
Parameters
Parameter | Type |
---|---|
data | any |
clientData | any |
Returns
any
Defined in
buildTrack()
buildTrack(data: Track | LavalinkTrack, requester: unknown): Track
Parameters
Parameter | Type |
---|---|
data | Track | LavalinkTrack |
requester | unknown |
Returns
Defined in
buildUnresolvedTrack()
buildUnresolvedTrack(query: UnresolvedTrack | UnresolvedQuery, requester: unknown): UnresolvedTrack
Builds a UnresolvedTrack to be resolved before being played .
Parameters
Parameter | Type | Description |
---|---|---|
query | UnresolvedTrack | UnresolvedQuery | |
requester | unknown |
Returns
Defined in
getClosestTrack()
getClosestTrack(data: UnresolvedTrack, player: Player): Promise<Track>
Parameters
Parameter | Type |
---|---|
data | UnresolvedTrack |
player | Player |
Returns
Promise
<Track
>
Defined in
getTransformedRequester()
getTransformedRequester(requester: unknown): unknown
Parameters
Parameter | Type |
---|---|
requester | unknown |
Returns
unknown
Defined in
isNode()
isNode(data: LavalinkNode): boolean
Validate if a data is equal to a node
Parameters
Parameter | Type | Description |
---|---|---|
data | LavalinkNode |
Returns
boolean
Defined in
isNodeOptions()
isNodeOptions(data: LavalinkNodeOptions): boolean
Validate if a data is equal to node options
Parameters
Parameter | Type | Description |
---|---|---|
data | LavalinkNodeOptions |
Returns
boolean
Defined in
isTrack()
isTrack(data: UnresolvedTrack | Track): data is Track
Validate if a data is equal to a track
Parameters
Parameter | Type | Description |
---|---|---|
data | UnresolvedTrack | Track | the Track to validate |
Returns
data is Track
Defined in
isUnresolvedTrack()
isUnresolvedTrack(data: UnresolvedTrack | Track): data is UnresolvedTrack
Checks if the provided argument is a valid UnresolvedTrack.
Parameters
Parameter | Type |
---|---|
data | UnresolvedTrack | Track |
Returns
data is UnresolvedTrack
Defined in
isUnresolvedTrackQuery()
isUnresolvedTrackQuery(data: UnresolvedQuery): boolean
Checks if the provided argument is a valid UnresolvedTrack.
Parameters
Parameter | Type |
---|---|
data | UnresolvedQuery |
Returns
boolean
Defined in
transformLavaSearchQuery()
transformLavaSearchQuery(query: LavaSearchQuery): object
Parameters
Parameter | Type |
---|---|
query | LavaSearchQuery |
Returns
object
Name | Type | Defined in |
---|---|---|
query | string | src/structures/Utils.ts:335 |
source | any | src/structures/Utils.ts:337 |
types | string [] | src/structures/Utils.ts:336 |
Defined in
transformQuery()
transformQuery(query: SearchQuery): object
Parameters
Parameter | Type |
---|---|
query | SearchQuery |
Returns
object
Name | Type | Defined in |
---|---|---|
extraQueryUrlParams | URLSearchParams | src/structures/Utils.ts:319 |
query | string | src/structures/Utils.ts:318 |
source | any | src/structures/Utils.ts:320 |
Defined in
validateQueryString()
validateQueryString( node: LavalinkNode, queryString: string, sourceString?: LavalinkSearchPlatform): void
Parameters
Parameter | Type |
---|---|
node | LavalinkNode |
queryString | string |
sourceString ? | LavalinkSearchPlatform |
Returns
void
Defined in
validateSourceString()
validateSourceString(node: LavalinkNode, sourceString: SearchPlatform): void
Parameters
Parameter | Type |
---|---|
node | LavalinkNode |
sourceString | SearchPlatform |
Returns
void