Discord Player

definePlugin

Define a reusable source plugin.

You are reading the v8 docsDev
FunctionTypeScript@discord-player/plugin-host
View sourcepackages/plugin-host/src/plugins/types.ts:282
function definePlugin<Options = Record<string, never>>(
  definition: PluginDefinition<Options>,
): PluginFactory<Options>

Define a reusable source plugin.

Parameters

NameTypeDescription
definitionPluginDefinition<Options>

Source lifecycle and identity.

Returns

PluginFactory<Options>

A typed registration factory. Each call supplies independent options.