mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
ci: fix typechecking in ci
This commit is contained in:
@@ -53,7 +53,7 @@ export enum VoiceConnectionStatus {
|
||||
*/
|
||||
export interface VoiceConnectionSignallingState {
|
||||
status: VoiceConnectionStatus.Signalling;
|
||||
subscription?: PlayerSubscription;
|
||||
subscription?: PlayerSubscription | undefined;
|
||||
adapter: DiscordGatewayAdapterImplementerMethods;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ export enum VoiceConnectionDisconnectReason {
|
||||
*/
|
||||
export interface VoiceConnectionDisconnectedBaseState {
|
||||
status: VoiceConnectionStatus.Disconnected;
|
||||
subscription?: PlayerSubscription;
|
||||
subscription?: PlayerSubscription | undefined;
|
||||
adapter: DiscordGatewayAdapterImplementerMethods;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ export type VoiceConnectionDisconnectedState =
|
||||
export interface VoiceConnectionConnectingState {
|
||||
status: VoiceConnectionStatus.Connecting;
|
||||
networking: Networking;
|
||||
subscription?: PlayerSubscription;
|
||||
subscription?: PlayerSubscription | undefined;
|
||||
adapter: DiscordGatewayAdapterImplementerMethods;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ export interface VoiceConnectionConnectingState {
|
||||
export interface VoiceConnectionReadyState {
|
||||
status: VoiceConnectionStatus.Ready;
|
||||
networking: Networking;
|
||||
subscription?: PlayerSubscription;
|
||||
subscription?: PlayerSubscription | undefined;
|
||||
adapter: DiscordGatewayAdapterImplementerMethods;
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ export class VoiceConnection extends EventEmitter {
|
||||
*
|
||||
* @param subscription - The removed subscription
|
||||
*/
|
||||
private onSubscriptionRemoved(subscription: PlayerSubscription) {
|
||||
protected onSubscriptionRemoved(subscription: PlayerSubscription) {
|
||||
if (this.state.status !== VoiceConnectionStatus.Destroyed && this.state.subscription === subscription) {
|
||||
this.state = {
|
||||
...this.state,
|
||||
|
||||
@@ -13,6 +13,6 @@ export class AudioPlayerError extends Error {
|
||||
super(error.message);
|
||||
this.resource = resource;
|
||||
this.name = error.name;
|
||||
this.stack = error.stack;
|
||||
this.stack = error.stack!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ export class AudioResource<T = unknown> {
|
||||
/**
|
||||
* The audio player that the resource is subscribed to, if any.
|
||||
*/
|
||||
public audioPlayer?: AudioPlayer;
|
||||
public audioPlayer?: AudioPlayer | undefined;
|
||||
|
||||
/**
|
||||
* The playback duration of this audio resource, given in milliseconds.
|
||||
|
||||
@@ -10,7 +10,7 @@ export interface CreateVoiceConnectionOptions {
|
||||
* If true, debug messages will be enabled for the voice connection and its
|
||||
* related components. Defaults to false.
|
||||
*/
|
||||
debug?: boolean;
|
||||
debug?: boolean | undefined;
|
||||
|
||||
adapterCreator: DiscordGatewayAdapterCreator;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export interface NetworkingReadyState {
|
||||
udp: VoiceUDPSocket;
|
||||
connectionOptions: ConnectionOptions;
|
||||
connectionData: ConnectionData;
|
||||
preparedPacket?: Buffer;
|
||||
preparedPacket?: Buffer | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,7 +94,7 @@ export interface NetworkingResumingState {
|
||||
udp: VoiceUDPSocket;
|
||||
connectionOptions: ConnectionOptions;
|
||||
connectionData: ConnectionData;
|
||||
preparedPacket?: Buffer;
|
||||
preparedPacket?: Buffer | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user