Hierarchy

  • DamonJsPlayer

Constructors

Properties

connection: Connection
damonjs: DamonJs
data: Map<string, any>
isTrackPlaying: boolean
lockMap: Map<string, Promise<any>> = ...
loop: LoopState = LoopState.None
player: Player
playerEvents: __module
search: ((query: string, options: DamonJsSearchOptions) => Promise<DamonJsSearchResult>)

Type declaration

shoukaku: Shoukaku
state: PlayerState = PlayerState.CONNECTING
stats: {
    playAttemptData: {
        destroyTriggers: number[];
        lastPlayTime: number;
        playAttempts: number[];
    };
}

Type declaration

  • playAttemptData: {
        destroyTriggers: number[];
        lastPlayTime: number;
        playAttempts: number[];
    }
    • destroyTriggers: number[]
    • lastPlayTime: number
    • playAttempts: number[]
textId: string

Accessors

Methods

  • Parameters

    • data: WebSocketClosedEvent

    Returns Promise<void>

  • Parameters

    • data: TrackExceptionEvent

    Returns Promise<void>

  • Type Parameters

    • T

    Parameters

    • key: string
    • operation: (() => Promise<T>)
        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

  • Change the channel mix settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • channelMix: ChannelMixSettings

      An object that conforms to ChannelMixSettings that defines how much the left and right channels affect each other (setting all factors to 0.5 causes both channels to get the same audio)

    Returns Promise<DamonJsPlayer>

  • Change the distortion settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • distortion: DistortionSettings

      An object that conforms to DistortionSettings that defines distortions in the audio

    Returns Promise<DamonJsPlayer>

  • Change the equalizer settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • equalizer: Band[]

      An array of objects that conforms to the Bands type that define volumes at different frequencies

    Returns Promise<DamonJsPlayer>

  • Change the all filter settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • filters: FilterOptions

      An object that conforms to FilterOptions that defines all filters to apply/modify

    Returns Promise<DamonJsPlayer>

  • Change the karaoke settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • Optional karaoke: KaraokeSettings

      An object that conforms to the KaraokeSettings type that defines a range of frequencies to mute

    Returns Promise<DamonJsPlayer>

  • Change the low pass settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • lowPass: LowPassSettings

      An object that conforms to LowPassSettings that defines the amount of suppression on higher frequencies

    Returns Promise<DamonJsPlayer>

  • Change the rotation settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • Optional rotation: RotationSettings

      An object that conforms to the RotationSettings type that defines the frequency of audio rotating round the listener

    Returns Promise<DamonJsPlayer>

  • Change the timescale settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • Optional timescale: TimescaleSettings

      An object that conforms to the TimescaleSettings type that defines the time signature to play the audio at

    Returns Promise<DamonJsPlayer>

  • Change the tremolo settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • Optional tremolo: FreqSettings

      An object that conforms to the FreqSettings type that defines an oscillation in volume

    Returns Promise<DamonJsPlayer>

  • Change the vibrato settings applied to the currently playing track

    Returns

    Promise

    Parameters

    • Optional vibrato: FreqSettings

      An object that conforms to the FreqSettings type that defines an oscillation in pitch

    Returns Promise<DamonJsPlayer>

  • Skips to the specified track in the queue. If the player is in a destroyed state, it will throw an error. If the player is currently looping the track or queue, it will continue to do so. If the provided track ID exists in the queue, it will skip to that track. If the provided track ID is greater than the queue length, it will skip to the last track. If the provided track ID is out of bounds, it will skip to the previous track.

    Returns

    A Promise that resolves to the DamonJsPlayer instance.

    Throws

    If the player is already destroyed.

    Parameters

    • trackId: number

      The ID of the track to skip to.

    Returns Promise<DamonJsPlayer>

Generated using TypeDoc