function createAudioResource

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

input: Readable | string
The resource to play
options: CreateAudioResourceOptions<T> & Pick<T extends null | undefined ? CreateAudioResourceOptions<T> : Required<CreateAudioResourceOptions<T>>, 'metadata'>
Configurable options for creating the resource