Skip to content

Commit

Permalink
refactor: rexport APIVoiceState as gateway alias
Browse files Browse the repository at this point in the history
  • Loading branch information
imnaiyar committed Aug 15, 2024
1 parent 8e79043 commit 3b4b66d
Show file tree
Hide file tree
Showing 18 changed files with 2,546 additions and 4,121 deletions.
4 changes: 1 addition & 3 deletions deno/gateway/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
// This file exports all the types available in the recommended gateway version
// Thereby, things MAY break in the future. Try sticking to imports from a specific version

export * from './v10.ts';
//# sourceMappingURL=index.d.ts.map
4 changes: 1 addition & 3 deletions deno/payloads/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
// This file exports all the payloads available in the recommended API version
// Thereby, things MAY break in the future. Try sticking to imports from a specific version

export * from './v10/mod.ts';
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions deno/payloads/v10/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
export * from './monetization.ts';
//# sourceMappingURL=index.d.ts.map
57 changes: 1 addition & 56 deletions deno/payloads/v10/voice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,62 +10,7 @@ import type { APIGuildMember } from './guild.ts';
*
* @deprecated This is deprecated, use {@apilink APIVoiceState}
*/
export interface GatewayVoiceState {
/**
* The guild id this voice state is for
*/
guild_id?: Snowflake;
/**
* The channel id this user is connected to
*/
channel_id: Snowflake | null;
/**
* The user id this voice state is for
*/
user_id: Snowflake;
/**
* The guild member this voice state is for
*
* See https://discord.com/developers/docs/resources/guild#guild-member-object
*/
member?: APIGuildMember;
/**
* The session id for this voice state
*/
session_id: string;
/**
* Whether this user is deafened by the server
*/
deaf: boolean;
/**
* Whether this user is muted by the server
*/
mute: boolean;
/**
* Whether this user is locally deafened
*/
self_deaf: boolean;
/**
* Whether this user is locally muted
*/
self_mute: boolean;
/**
* Whether this user is streaming using "Go Live"
*/
self_stream?: boolean;
/**
* Whether this user's camera is enabled
*/
self_video: boolean;
/**
* Whether this user is muted by the current user
*/
suppress: boolean;
/**
* The time at which the user requested to speak
*/
request_to_speak_timestamp: string | null;
}
export type GatewayVoiceState = APIVoiceState;

/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
Expand Down
1 change: 1 addition & 0 deletions deno/payloads/v6/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export * from './teams.ts';
export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions deno/payloads/v8/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ export * from './template.ts';
export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions deno/payloads/v9/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
export * from './monetization.ts';
//# sourceMappingURL=index.d.ts.map
57 changes: 1 addition & 56 deletions deno/payloads/v9/voice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,62 +10,7 @@ import type { APIGuildMember } from './guild.ts';
*
* @deprecated This is deprecated, use {@apilink APIVoiceState}
*/
export interface GatewayVoiceState {
/**
* The guild id this voice state is for
*/
guild_id?: Snowflake;
/**
* The channel id this user is connected to
*/
channel_id: Snowflake | null;
/**
* The user id this voice state is for
*/
user_id: Snowflake;
/**
* The guild member this voice state is for
*
* See https://discord.com/developers/docs/resources/guild#guild-member-object
*/
member?: APIGuildMember;
/**
* The session id for this voice state
*/
session_id: string;
/**
* Whether this user is deafened by the server
*/
deaf: boolean;
/**
* Whether this user is muted by the server
*/
mute: boolean;
/**
* Whether this user is locally deafened
*/
self_deaf: boolean;
/**
* Whether this user is locally muted
*/
self_mute: boolean;
/**
* Whether this user is streaming using "Go Live"
*/
self_stream?: boolean;
/**
* Whether this user's camera is enabled
*/
self_video: boolean;
/**
* Whether this user is muted by the current user
*/
suppress: boolean;
/**
* The time at which the user requested to speak
*/
request_to_speak_timestamp: string | null;
}
export type GatewayVoiceState = APIVoiceState;

/**
* https://discord.com/developers/docs/resources/voice#voice-state-object
Expand Down
4 changes: 1 addition & 3 deletions deno/rest/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
// This file exports all the types available in the recommended API version
// Thereby, things MAY break in the future. Try sticking to imports from a specific version

export * from './v10/mod.ts';
//# sourceMappingURL=index.d.ts.map
Loading

0 comments on commit 3b4b66d

Please sign in to comment.