Util
No description provided
Util
Methods
public static arrayCloneShuffle(src): Array<T>
| Parameter | Type | Optional | 
|---|---|---|
| src | Array<T> | ❌ | 
public static buildTimeCode(duration): string
Builds time code
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| duration | TimeData | ❌ | The duration object | 
public static cleanTitle(title, source): string
Cleans the track title
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| title | string | ❌ | The title | 
| source | TrackSource | ❌ | 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
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| duration | number | ❌ | The duration in ms | 
public static getFetch(): Promise<any>
public static getRuntime(): Runtime
Gets the runtime information
public static import(id): Promise<SafeImport>
| Parameter | Type | Optional | 
|---|---|---|
| id | string | ❌ | 
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
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| arr | Array<T> | ❌ | The array | 
public static noop(): void
public static parseMS(milliseconds): TimeData
Parses milliseconds to consumable time object
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| milliseconds | number | ❌ | The time in ms | 
public static randomChoice(src): T
| Parameter | Type | Optional | 
|---|---|---|
| src | Array<T> | ❌ | 
public static require(id): SafeRequire
Safer require
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| id | string | ❌ | Node require id | 
public static wait(time): Promise<undefined>
Asynchronous timeout
| Parameter | Type | Optional | Description | 
|---|---|---|---|
| time | number | ❌ | The time in ms to wait |