Overload 1
Overload 2
declare function createAudioResource<T>(input: Readable | string, 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
the type for the metadata (if any) of the audio resource
Parameters
Readable | string input:
The resource to play
CreateAudioResourceOptions<T> & Pick<T extends null | undefined ? CreateAudioResourceOptions<T> : Required<CreateAudioResourceOptions<T>>, 'metadata'> options:
Configurable options for creating the resource