Discord Player

OperationMap

Extensible source operation contracts. Augmented operations also need host definitions.

You are reading the v8 docsDev
InterfaceTypeScript@discord-player/plugin-host
View sourcepackages/plugin-host/src/plugins/types.ts:104
interface OperationMap

Extensible source operation contracts. Augmented operations also need host definitions.

Properties

serialization.beforeRestore

serialization.beforeRestore: Operation<SerializedEntityUnion, SerializedEntityUnion, "pipe">

Transform a validated persistence payload before restoring an entity.

serialization.afterSerialize

serialization.afterSerialize: Operation<SerializedEntityUnion, SerializedEntityUnion, "pipe">

Transform serialized application metadata; the result is validated again.

media.beforeResolve

media.beforeResolve: Operation<SourceTrackRequest, SourceTrackRequest, "pipe">

Transform source preparation while preserving portable provider identity.

search.beforeQuery

search.beforeQuery: Operation<SourceQuery, SourceQuery, "pipe">

Transform a portable search query before provider selection.

search.afterResults

search.afterResults: Operation<SearchResultData, SearchResultData, "pipe">

Transform metadata returned by search orchestration.

media.transform

Transform encoded bytes across modern plugins, independent of source ownership.

media.descriptor

media.descriptor: Operation<{
  readonly source: MediaSource;
  readonly guildId: string | null;
}, {
  readonly source: MediaSource;
  readonly guildId: string | null;
}, "pipe">

Transform a resolved descriptor. Standalone execution has no guild context.

lyrics.search: Operation<LyricsRequest, LyricsResult[] | null, "collect">

Optional lyrics lookup, independent of all source operations.

search.query.match

search.query.match: Operation<SourceQuery, SourceMatch | null, "collect">

Collect scored providers.

search.query.resolve

search.query.resolve: Operation<SourceQuery, SearchResultData, "first">

Resolve metadata with the selected provider.

track.stream

track.stream: Operation<SourceTrackRequest, SourceStream, "first">

Resolve playable media.

track.bridge

track.bridge: Operation<SourceBridgeRequest, SourceStream, "first">

Explicit fallback for sources that cannot stream their own metadata.

stream.transform

Local encoded stream transformation.

track.stream.resolved

track.stream.resolved: Operation<SourceTrackRequest, void, "broadcast">

Notification after a source is resolved.

On this page