Skip to content

Commit

Permalink
fix(GatewayGuildDeleteDispatchData): make unavailable optional (#1092)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza committed Sep 5, 2024
1 parent 93e649a commit 258fb72
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
9 changes: 8 additions & 1 deletion deno/gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,14 @@ export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.Guild
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-delete
*/
export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
export interface GatewayGuildDeleteDispatchData extends Omit<APIUnavailableGuild, 'unavailable'> {
/**
* `true` if this guild is unavailable due to an outage
*
* If the field is not set, the user was removed from the guild.
*/
unavailable?: true;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
Expand Down
9 changes: 8 additions & 1 deletion deno/gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,14 @@ export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.Guild
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-delete
*/
export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
export interface GatewayGuildDeleteDispatchData extends Omit<APIUnavailableGuild, 'unavailable'> {
/**
* `true` if this guild is unavailable due to an outage
*
* If the field is not set, the user was removed from the guild.
*/
unavailable?: true;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
Expand Down
9 changes: 8 additions & 1 deletion gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,14 @@ export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.Guild
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-delete
*/
export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
export interface GatewayGuildDeleteDispatchData extends Omit<APIUnavailableGuild, 'unavailable'> {
/**
* `true` if this guild is unavailable due to an outage
*
* If the field is not set, the user was removed from the guild.
*/
unavailable?: true;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
Expand Down
9 changes: 8 additions & 1 deletion gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,14 @@ export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.Guild
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-delete
*/
export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
export interface GatewayGuildDeleteDispatchData extends Omit<APIUnavailableGuild, 'unavailable'> {
/**
* `true` if this guild is unavailable due to an outage
*
* If the field is not set, the user was removed from the guild.
*/
unavailable?: true;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
Expand Down

0 comments on commit 258fb72

Please sign in to comment.