Skip to content

Commit 04861db

Browse files
types: no more gymnastics
1 parent f2401cd commit 04861db

File tree

8 files changed

+32
-52
lines changed

8 files changed

+32
-52
lines changed

deno/gateway/v10.ts

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/gateway/v9.ts

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v10/voice.ts

Lines changed: 7 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v9/voice.ts

Lines changed: 7 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gateway/v10.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import type {
4646
APIGuildMemberUser,
4747
GatewayGuildMembersChunkPresence,
4848
APIBaseMessage,
49-
APIVoiceStateMember,
5049
APIVoiceState,
5150
} from '../payloads/v10/index';
5251
import type { ReactionType } from '../rest/v10/index';
@@ -880,7 +879,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
880879
*
881880
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
882881
*/
883-
voice_states: (APIBaseVoiceState & APIVoiceStateMember)[];
882+
voice_states: APIBaseVoiceState[];
884883
/**
885884
* Users in the guild
886885
*

gateway/v9.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ import type {
4646
GatewayGuildMembersChunkPresence,
4747
APIBaseMessage,
4848
APIGuildMemberJoined,
49-
APIVoiceStateMember,
5049
APIVoiceState,
5150
} from '../payloads/v9/index';
5251
import type { ReactionType } from '../rest/v9/index';
@@ -879,7 +878,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
879878
*
880879
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
881880
*/
882-
voice_states: (APIBaseVoiceState & APIVoiceStateMember)[];
881+
voice_states: APIBaseVoiceState[];
883882
/**
884883
* Users in the guild
885884
*

payloads/v10/voice.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ export interface APIBaseVoiceState {
2323
* The user id this voice state is for
2424
*/
2525
user_id: Snowflake;
26+
/**
27+
* The guild member this voice state is for
28+
*
29+
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
30+
*/
31+
member?: APIGuildMember;
2632
/**
2733
* The session id for this voice state
2834
*/
@@ -61,20 +67,10 @@ export interface APIBaseVoiceState {
6167
request_to_speak_timestamp: string | null;
6268
}
6369

64-
export interface APIVoiceStateMember {
65-
/**
66-
* The guild member this voice state is for
67-
*
68-
* @remarks The member field will have `joined_at` set to `null` if the member was invited as a guest.
69-
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
70-
*/
71-
member?: APIGuildMember;
72-
}
73-
7470
/**
7571
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
7672
*/
77-
export interface APIVoiceState extends APIBaseVoiceState, APIVoiceStateMember {
73+
export interface APIVoiceState extends APIBaseVoiceState {
7874
/**
7975
* The guild id this voice state is for
8076
*/

payloads/v9/voice.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ export interface APIBaseVoiceState {
2020
* The user id this voice state is for
2121
*/
2222
user_id: Snowflake;
23+
/**
24+
* The guild member this voice state is for
25+
*
26+
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
27+
*/
28+
member?: APIGuildMember;
2329
/**
2430
* The session id for this voice state
2531
*/
@@ -58,20 +64,10 @@ export interface APIBaseVoiceState {
5864
request_to_speak_timestamp: string | null;
5965
}
6066

61-
export interface APIVoiceStateMember {
62-
/**
63-
* The guild member this voice state is for
64-
*
65-
* @remarks The member field will have `joined_at` set to `null` if the member was invited as a guest.
66-
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
67-
*/
68-
member?: APIGuildMember;
69-
}
70-
7167
/**
7268
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
7369
*/
74-
export interface APIVoiceState extends APIBaseVoiceState, APIVoiceStateMember {
70+
export interface APIVoiceState extends APIBaseVoiceState {
7571
/**
7672
* The guild id this voice state is for
7773
*/

0 commit comments

Comments
 (0)