Add FiltersOption type and make some types optional (#290)
This commit is contained in:
parent
2a57842ccd
commit
031f7566e8
1 changed files with 8 additions and 5 deletions
13
typings/index.d.ts
vendored
13
typings/index.d.ts
vendored
|
@ -30,8 +30,8 @@ declare module 'discord-player' {
|
||||||
|
|
||||||
public static get AudioFilters(): PlayerFilters;
|
public static get AudioFilters(): PlayerFilters;
|
||||||
public isPlaying(message: Message): boolean;
|
public isPlaying(message: Message): boolean;
|
||||||
public setFilters(message: Message, newFilters: Partial<Filters>): Promise<void>;
|
public setFilters(message: Message, newFilters: Partial<FiltersOption>): Promise<void>;
|
||||||
public play(message: Message, query: string | Track, firstResult?: boolean): Promise<void>;
|
public play(message: Message, query: string | Track, firstResult?: boolean, isAttachment?: boolean): Promise<void>;
|
||||||
public pause(message: Message): void;
|
public pause(message: Message): void;
|
||||||
public resume(message: Message): void;
|
public resume(message: Message): void;
|
||||||
public stop(message: Message): void;
|
public stop(message: Message): void;
|
||||||
|
@ -45,7 +45,7 @@ declare module 'discord-player' {
|
||||||
public setLoopMode(message: Message, enabled: boolean): boolean
|
public setLoopMode(message: Message, enabled: boolean): boolean
|
||||||
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 seek(message: Message, time: number): Promise<void>;
|
||||||
public moveTo(message: Message, channel: VoiceChannel): void;
|
public moveTo(message: Message, channel: VoiceChannel): void;
|
||||||
|
|
||||||
|
@ -98,12 +98,15 @@ declare module 'discord-player' {
|
||||||
type FiltersStatuses = {
|
type FiltersStatuses = {
|
||||||
[key in Filters]: boolean;
|
[key in Filters]: boolean;
|
||||||
}
|
}
|
||||||
|
type FiltersOption = {
|
||||||
|
[key in Filters]: boolean;
|
||||||
|
}
|
||||||
type PlayerFilters = {
|
type PlayerFilters = {
|
||||||
[key in Filters]: string
|
[key in Filters]: string
|
||||||
}
|
}
|
||||||
interface ProgressBarOptions {
|
interface ProgressBarOptions {
|
||||||
timecodes: boolean;
|
timecodes?: boolean;
|
||||||
queue: boolean;
|
queue?: boolean;
|
||||||
}
|
}
|
||||||
interface CustomPlaylist {
|
interface CustomPlaylist {
|
||||||
tracks: Track[];
|
tracks: Track[];
|
||||||
|
|
Loading…
Reference in a new issue