docs: export all visible symbols (#10760)

* docs: export all visible symbols

* fix: discord.js except raw

* refactor: remove raw data types

* docs: add back discord.js tsdoc file

* refactor: remove underscores

* fix: merge

* docs(RPCRedis): make `promises` as internal

---------

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Almeida
2025-05-26 18:41:08 +01:00
committed by GitHub
parent c1f5bb2fba
commit 78d512c347
19 changed files with 533 additions and 804 deletions

View File

@@ -272,14 +272,14 @@ export class VoiceConnection extends EventEmitter {
/**
* The current state of the voice connection.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/
public get state() {
return this._state;
}
/**
* Updates the state of the voice connection, performing clean-up operations where necessary.
*/
public set state(newState: VoiceConnectionState) {
const oldState = this._state;
const oldNetworking = Reflect.get(oldState, 'networking') as Networking | undefined;

View File

@@ -304,14 +304,14 @@ export class AudioPlayer extends EventEmitter {
/**
* The state that the player is in.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/
public get state() {
return this._state;
}
/**
* Sets a new state for the player, performing clean-up operations where necessary.
*/
public set state(newState: AudioPlayerState) {
const oldState = this._state;
const newResource = Reflect.get(newState, 'resource') as AudioResource | undefined;

View File

@@ -17,4 +17,4 @@ export { AudioResource, type CreateAudioResourceOptions, createAudioResource } f
export { PlayerSubscription } from './PlayerSubscription';
export { StreamType } from './TransformerGraph';
export { StreamType, type Edge, TransformerType, Node } from './TransformerGraph';

View File

@@ -3,6 +3,24 @@ export * from './audio/index';
export * from './util/index';
export * from './receive/index';
export {
Networking,
type ConnectionData,
type ConnectionOptions,
type NetworkingState,
type NetworkingResumingState,
type NetworkingSelectingProtocolState,
type NetworkingUdpHandshakingState,
type NetworkingClosedState,
type NetworkingIdentifyingState,
type NetworkingOpeningWsState,
type NetworkingReadyState,
NetworkingStatusCode,
VoiceUDPSocket,
VoiceWebSocket,
type SocketConfig,
} from './networking/index.js';
export {
VoiceConnection,
type VoiceConnectionState,

View File

@@ -131,7 +131,7 @@ export type NetworkingState =
* are first received on the main bot gateway, in the form of VOICE_SERVER_UPDATE
* and VOICE_STATE_UPDATE packets.
*/
interface ConnectionOptions {
export interface ConnectionOptions {
endpoint: string;
serverId: string;
sessionId: string;
@@ -254,14 +254,14 @@ export class Networking extends EventEmitter {
/**
* The current state of the networking instance.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/
public get state(): NetworkingState {
return this._state;
}
/**
* Sets a new state for the networking instance, performing clean-up operations where necessary.
*/
public set state(newState: NetworkingState) {
const oldWs = Reflect.get(this._state, 'ws') as VoiceWebSocket | undefined;
const newWs = Reflect.get(newState, 'ws') as VoiceWebSocket | undefined;