From 0e44ecd420ba94b490c2cba1f7a30d1fa5878183 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Fri, 3 Apr 2020 11:19:24 +0100 Subject: [PATCH] chore: fix typings/docs for VoiceBroadcast (#4014) --- src/client/voice/VoiceBroadcast.js | 1 + typings/index.d.ts | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client/voice/VoiceBroadcast.js b/src/client/voice/VoiceBroadcast.js index f84e66828..5755b52f3 100644 --- a/src/client/voice/VoiceBroadcast.js +++ b/src/client/voice/VoiceBroadcast.js @@ -18,6 +18,7 @@ const { Events } = require('../../util/Constants'); * } * ``` * @implements {PlayInterface} + * @extends {EventEmitter} */ class VoiceBroadcast extends EventEmitter { constructor(client) { diff --git a/typings/index.d.ts b/typings/index.d.ts index b23b36bbe..0d43e8708 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1535,19 +1535,16 @@ declare module 'discord.js' { constructor(client: Client); public client: Client; public subscribers: StreamDispatcher[]; - public readonly dispatcher: BroadcastDispatcher; + public readonly dispatcher?: BroadcastDispatcher; public play(input: string | Readable, options?: StreamOptions): BroadcastDispatcher; + public end(): void; public on(event: 'end', listener: () => void): this; - public on(event: 'error', listener: (error: Error) => void): this; public on(event: 'subscribe' | 'unsubscribe', listener: (dispatcher: StreamDispatcher) => void): this; - public on(event: 'warn', listener: (warning: string | Error) => void): this; public on(event: string, listener: (...args: any[]) => void): this; public once(event: 'end', listener: () => void): this; - public once(event: 'error', listener: (error: Error) => void): this; public once(event: 'subscribe' | 'unsubscribe', listener: (dispatcher: StreamDispatcher) => void): this; - public once(event: 'warn', listener: (warning: string | Error) => void): this; public once(event: string, listener: (...args: any[]) => void): this; }