@@ -2,7 +2,8 @@ import { HttpStatusCode } from "axios";
22import { OPType } from "../Typings" ;
33import { Routes } from "../Constants" ;
44import { isString } from "../Functions" ;
5- import type { BaseEventPayload , CommonPluginInfo , JsonObject , PlayerPlugin } from "../Typings" ;
5+ import { PlayerPlugin } from "../Main" ;
6+ import type { BaseEventPayload , CommonPluginInfo , JsonObject } from "../Typings" ;
67import type { Node } from "../Node" ;
78import type { Queue } from "../Queue" ;
89import type { Player } from "../Main" ;
@@ -47,24 +48,22 @@ export namespace LavaLyrics {
4748
4849 export type Event = LyricsFoundEvent | LyricsNotFoundEvent | LyricsLineEvent ;
4950
50- export type EventMap = {
51- lyricsFound : [ queue : Queue , lyrics : Lyrics ] ;
52- lyricsNotFound : [ queue : Queue ] ;
53- lyricsLine : [ queue : Queue , line : LyricsLine , index : number , skipped : boolean ] ;
54- } ;
55-
5651 export interface PluginOptions {
5752 skipTrackSource ?: boolean ;
5853 }
5954
60- export class Plugin implements PlayerPlugin {
61- name = "lavalyrics" as const ;
62- eventMap ! : EventMap ;
55+ export class Plugin extends PlayerPlugin < {
56+ lyricsFound : [ queue : Queue , lyrics : Lyrics ] ;
57+ lyricsNotFound : [ queue : Queue ] ;
58+ lyricsLine : [ queue : Queue , line : LyricsLine , index : number , skipped : boolean ] ;
59+ } > {
60+ name = "lavalyrics" ;
6361
6462 #player! : Player ;
6563 skipTrackSource : boolean ;
6664
6765 constructor ( options ?: PluginOptions ) {
66+ super ( ) ;
6867 this . skipTrackSource = options ?. skipTrackSource === true ;
6968 }
7069
0 commit comments