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 isPlaying(message: Message): boolean;
|
||||
public setFilters(message: Message, newFilters: Partial<Filters>): Promise<void>;
|
||||
public play(message: Message, query: string | Track, firstResult?: boolean): Promise<void>;
|
||||
public setFilters(message: Message, newFilters: Partial<FiltersOption>): Promise<void>;
|
||||
public play(message: Message, query: string | Track, firstResult?: boolean, isAttachment?: boolean): Promise<void>;
|
||||
public pause(message: Message): void;
|
||||
public resume(message: Message): void;
|
||||
public stop(message: Message): void;
|
||||
|
@ -45,7 +45,7 @@ declare module 'discord-player' {
|
|||
public setLoopMode(message: Message, enabled: boolean): boolean
|
||||
public shuffle(message: Message): Queue;
|
||||
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;
|
||||
|
||||
|
@ -98,12 +98,15 @@ declare module 'discord-player' {
|
|||
type FiltersStatuses = {
|
||||
[key in Filters]: boolean;
|
||||
}
|
||||
type FiltersOption = {
|
||||
[key in Filters]: boolean;
|
||||
}
|
||||
type PlayerFilters = {
|
||||
[key in Filters]: string
|
||||
}
|
||||
interface ProgressBarOptions {
|
||||
timecodes: boolean;
|
||||
queue: boolean;
|
||||
timecodes?: boolean;
|
||||
queue?: boolean;
|
||||
}
|
||||
interface CustomPlaylist {
|
||||
tracks: Track[];
|
||||
|
|
Loading…
Reference in a new issue