Discord Player

Util

No description provided

Util

Methods

public static arrayCloneShuffle(src): Array<T>

ParameterTypeOptional
srcArray<T>❌

public static buildTimeCode(duration): string

Builds time code

ParameterTypeOptionalDescription
durationTimeData❌The duration object

public static cleanTitle(title, source): string

Cleans the track title

ParameterTypeOptionalDescription
titlestring❌The title
sourceTrackSource❌The source

public static durationString(durObj): string

Creates duration string

| Parameter | Type | Optional | Description | | --------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ----------- | ------------------- | | durObj | Record<string | number> | ❌ | The duration object |

public static formatDuration(duration): string

Formats duration

ParameterTypeOptionalDescription
durationnumber❌The duration in ms

public static getFetch(): Promise<any>

public static getRuntime(): Runtime

Gets the runtime information

public static import(id): Promise<SafeImport>

ParameterTypeOptional
idstring❌

public static isVoiceEmpty(channel): boolean

Checks if the voice channel is empty

| Parameter | Type | Optional | Description | | --------- | ------------ | ------------ | ----------- | ----------------- | | channel | VoiceChannel | StageChannel | ❌ | The voice channel |

public static last(arr): T

Picks last item of the given array

ParameterTypeOptionalDescription
arrArray<T>❌The array

public static noop(): void

public static parseMS(milliseconds): TimeData

Parses milliseconds to consumable time object

ParameterTypeOptionalDescription
millisecondsnumber❌The time in ms

public static randomChoice(src): T

ParameterTypeOptional
srcArray<T>❌

public static require(id): SafeRequire

Safer require

ParameterTypeOptionalDescription
idstring❌Node require id

public static wait(time): Promise<undefined>

Asynchronous timeout

ParameterTypeOptionalDescription
timenumber❌The time in ms to wait

public static warn(message, code, detail?): void

ParameterTypeOptional
messagestring❌
codestring❌
detailstring✅