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
durationTimeDataThe duration object

public static cleanTitle(title, source): string

Cleans the track title

ParameterTypeOptionalDescription
titlestringThe title
sourceTrackSourceThe 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
durationnumberThe 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
millisecondsnumberThe time in ms

public static randomChoice(src): T

ParameterTypeOptional
srcArray<T>

public static require(id): SafeRequire

Safer require

ParameterTypeOptionalDescription
idstringNode require id

public static wait(time): Promise<undefined>

Asynchronous timeout

ParameterTypeOptionalDescription
timenumberThe time in ms to wait

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

ParameterTypeOptional
messagestring
codestring
detailstring