Discord Player

createAudioResource

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

createAudioResource(input, options): AudioResource<Metadata extends null | undefined ? null : Metadata>

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

ParameterTypeOptionalDescription
inputstring | ReadableThe resource to play
optionsCreateAudioResourceOptions<Metadata> & Pick<Metadata extends undefined | null ? CreateAudioResourceOptions<Metadata<Metadata>> : Required<CreateAudioResourceOptions<Metadata>>['metadata']>Configurable options for creating the resource

On this page

createAudioResource(input, options): AudioResource<Metadata extends null | undefined ? null : Metadata>