🏷️ Correct typings
This commit is contained in:
parent
76c394784e
commit
64e7f06990
1 changed files with 10 additions and 5 deletions
15
typings/index.d.ts
vendored
15
typings/index.d.ts
vendored
|
@ -46,6 +46,8 @@ declare module 'discord-player' {
|
||||||
public shuffle(message: Message): Queue;
|
public shuffle(message: Message): Queue;
|
||||||
public remove(message: Message, trackOrPosition: Track | number): Track;
|
public remove(message: Message, trackOrPosition: Track | number): Track;
|
||||||
public createProgressBar(message: Message, progressBarOptions: ProgressBarOptions): string;
|
public createProgressBar(message: Message, progressBarOptions: ProgressBarOptions): string;
|
||||||
|
public seek(message: Message, time: number): Promise<void>;
|
||||||
|
public moveTo(message: Message, channel: VoiceChannel): void;
|
||||||
|
|
||||||
public on<K extends keyof PlayerEvents>(event: K, listener: (...args: PlayerEvents[K]) => void): this;
|
public on<K extends keyof PlayerEvents>(event: K, listener: (...args: PlayerEvents[K]) => void): this;
|
||||||
public once<K extends keyof PlayerEvents>(event: K, listener: (...args: PlayerEvents[K]) => void): this;
|
public once<K extends keyof PlayerEvents>(event: K, listener: (...args: PlayerEvents[K]) => void): this;
|
||||||
|
@ -53,13 +55,15 @@ declare module 'discord-player' {
|
||||||
}
|
}
|
||||||
type MusicQuality = 'high' | 'low';
|
type MusicQuality = 'high' | 'low';
|
||||||
interface PlayerOptions {
|
interface PlayerOptions {
|
||||||
leaveOnEnd: boolean;
|
leaveOnEnd?: boolean;
|
||||||
leaveOnEndCooldown?: number;
|
leaveOnEndCooldown?: number;
|
||||||
leaveOnStop: boolean;
|
leaveOnStop?: boolean;
|
||||||
leaveOnEmpty: boolean;
|
leaveOnEmpty?: boolean;
|
||||||
leaveOnEmptyCooldown?: number;
|
leaveOnEmptyCooldown?: number;
|
||||||
autoSelfDeaf: boolean;
|
autoSelfDeaf?: boolean;
|
||||||
quality: MusicQuality;
|
quality?: MusicQuality;
|
||||||
|
enableLive?: boolean;
|
||||||
|
ytdlRequestOptions?: any;
|
||||||
}
|
}
|
||||||
type Filters =
|
type Filters =
|
||||||
| 'bassboost'
|
| 'bassboost'
|
||||||
|
@ -146,6 +150,7 @@ declare module 'discord-player' {
|
||||||
// these are getters
|
// these are getters
|
||||||
public playing: Track;
|
public playing: Track;
|
||||||
public calculatedVolume: number;
|
public calculatedVolume: number;
|
||||||
|
public currentStreamTime: number;
|
||||||
}
|
}
|
||||||
class Track {
|
class Track {
|
||||||
constructor(videoData: object, user: User, player: Player);
|
constructor(videoData: object, user: User, player: Player);
|
||||||
|
|
Loading…
Reference in a new issue