Search...

createAudioResource

Creates an audio resource that can be played by audio players.
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>;
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>;
NameTypeOptionalDescription
inputstring | ReadableNoThe resource to play
optionsCreateAudioResourceOptions<T> & Pick<T extends null | undefined ? CreateAudioResourceOptions<T> : Required<CreateAudioResourceOptions<T>>, 'metadata'>NoConfigurable options for creating the resource T - the type for the metadata (if any) of the audio resource