function createAudioResource

declare function createAudioResource<T>(input: string | Readable, options: CreateAudioResourceOptions<T> & Pick<T extends null | undefined ? CreateAudioResourceOptions<T> : Required<CreateAudioResourceOptions<T>>, 'metadata'>): AudioResource<T extends null | undefined ? null : T>;

Creates an audio resource that can be played by audio players.

Type Parameters

T

Parameters

input: string | Readable
The resource to play
options: CreateAudioResourceOptions<T> & Pick<T extends null | undefined ? CreateAudioResourceOptions<T> : Required<CreateAudioResourceOptions<T>>, 'metadata'>
Configurable options for creating the resource T - the type for the metadata (if any) of the audio resource