fix: add missing gateway dispatch payloads to gateway event union (#619)

This commit is contained in:
john-batch
2022-10-27 20:16:05 +02:00
committed by GitHub
parent aaa57b4fe9
commit 348dd416d1
4 changed files with 144 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import type { Snowflake } from '../globals.ts';
import type { GatewayPresenceUpdate } from '../payloads/v10/gateway.ts';
import type {
APIApplication,
APIApplicationCommandPermission,
APIAutoModerationRule,
APIAutoModerationAction,
APIChannel,
@@ -280,6 +281,11 @@ export type GatewayReceivePayload =
| GatewayDispatchPayload;
export type GatewayDispatchPayload =
| GatewayAutoModerationRuleModifyDispatch
| GatewayAutoModerationRuleCreateDispatch
| GatewayAutoModerationRuleDeleteDispatch
| GatewayAutoModerationActionExecutionDispatch
| GatewayApplicationCommandPermissionsUpdateDispatch
| GatewayChannelModifyDispatch
| GatewayChannelPinsUpdateDispatch
| GatewayGuildBanModifyDispatch
@@ -556,6 +562,36 @@ export interface GatewayAutoModerationActionExecutionDispatchData {
matched_content: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
*/
export type GatewayApplicationCommandPermissionsUpdateDispatch = DataPayload<
GatewayDispatchEvents.ApplicationCommandPermissionsUpdate,
GatewayApplicationCommandPermissionsUpdateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
*/
export interface GatewayApplicationCommandPermissionsUpdateDispatchData {
/**
* ID of the command or the application ID
*/
id: Snowflake;
/**
* ID of the application the command belongs to
*/
application_id: Snowflake;
/**
* ID of the guild
*/
guild_id: Snowflake;
/**
* Permissions for the command in the guild, max of 100
*/
permissions: APIApplicationCommandPermission[];
}
/**
* https://discord.com/developers/docs/topics/gateway#channel-create
* https://discord.com/developers/docs/topics/gateway#channel-update

View File

@@ -6,6 +6,7 @@ import type { Snowflake } from '../globals.ts';
import type { GatewayPresenceUpdate } from '../payloads/v9/gateway.ts';
import type {
APIApplication,
APIApplicationCommandPermission,
APIAutoModerationRule,
APIAutoModerationAction,
APIChannel,
@@ -279,6 +280,11 @@ export type GatewayReceivePayload =
| GatewayDispatchPayload;
export type GatewayDispatchPayload =
| GatewayApplicationCommandPermissionsUpdateDispatch
| GatewayAutoModerationRuleModifyDispatch
| GatewayAutoModerationRuleCreateDispatch
| GatewayAutoModerationRuleDeleteDispatch
| GatewayAutoModerationActionExecutionDispatch
| GatewayChannelModifyDispatch
| GatewayChannelPinsUpdateDispatch
| GatewayGuildBanModifyDispatch
@@ -555,6 +561,36 @@ export interface GatewayAutoModerationActionExecutionDispatchData {
matched_content: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
*/
export type GatewayApplicationCommandPermissionsUpdateDispatch = DataPayload<
GatewayDispatchEvents.ApplicationCommandPermissionsUpdate,
GatewayApplicationCommandPermissionsUpdateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
*/
export interface GatewayApplicationCommandPermissionsUpdateDispatchData {
/**
* ID of the command or the application ID
*/
id: Snowflake;
/**
* ID of the application the command belongs to
*/
application_id: Snowflake;
/**
* ID of the guild
*/
guild_id: Snowflake;
/**
* Permissions for the command in the guild, max of 100
*/
permissions: APIApplicationCommandPermission[];
}
/**
* https://discord.com/developers/docs/topics/gateway#channel-create
* https://discord.com/developers/docs/topics/gateway#channel-update

View File

@@ -6,6 +6,7 @@ import type { Snowflake } from '../globals';
import type { GatewayPresenceUpdate } from '../payloads/v10/gateway';
import type {
APIApplication,
APIApplicationCommandPermission,
APIAutoModerationRule,
APIAutoModerationAction,
APIChannel,
@@ -280,6 +281,11 @@ export type GatewayReceivePayload =
| GatewayDispatchPayload;
export type GatewayDispatchPayload =
| GatewayAutoModerationRuleModifyDispatch
| GatewayAutoModerationRuleCreateDispatch
| GatewayAutoModerationRuleDeleteDispatch
| GatewayAutoModerationActionExecutionDispatch
| GatewayApplicationCommandPermissionsUpdateDispatch
| GatewayChannelModifyDispatch
| GatewayChannelPinsUpdateDispatch
| GatewayGuildBanModifyDispatch
@@ -556,6 +562,36 @@ export interface GatewayAutoModerationActionExecutionDispatchData {
matched_content: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
*/
export type GatewayApplicationCommandPermissionsUpdateDispatch = DataPayload<
GatewayDispatchEvents.ApplicationCommandPermissionsUpdate,
GatewayApplicationCommandPermissionsUpdateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
*/
export interface GatewayApplicationCommandPermissionsUpdateDispatchData {
/**
* ID of the command or the application ID
*/
id: Snowflake;
/**
* ID of the application the command belongs to
*/
application_id: Snowflake;
/**
* ID of the guild
*/
guild_id: Snowflake;
/**
* Permissions for the command in the guild, max of 100
*/
permissions: APIApplicationCommandPermission[];
}
/**
* https://discord.com/developers/docs/topics/gateway#channel-create
* https://discord.com/developers/docs/topics/gateway#channel-update

View File

@@ -6,6 +6,7 @@ import type { Snowflake } from '../globals';
import type { GatewayPresenceUpdate } from '../payloads/v9/gateway';
import type {
APIApplication,
APIApplicationCommandPermission,
APIAutoModerationRule,
APIAutoModerationAction,
APIChannel,
@@ -279,6 +280,11 @@ export type GatewayReceivePayload =
| GatewayDispatchPayload;
export type GatewayDispatchPayload =
| GatewayApplicationCommandPermissionsUpdateDispatch
| GatewayAutoModerationRuleModifyDispatch
| GatewayAutoModerationRuleCreateDispatch
| GatewayAutoModerationRuleDeleteDispatch
| GatewayAutoModerationActionExecutionDispatch
| GatewayChannelModifyDispatch
| GatewayChannelPinsUpdateDispatch
| GatewayGuildBanModifyDispatch
@@ -555,6 +561,36 @@ export interface GatewayAutoModerationActionExecutionDispatchData {
matched_content: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
*/
export type GatewayApplicationCommandPermissionsUpdateDispatch = DataPayload<
GatewayDispatchEvents.ApplicationCommandPermissionsUpdate,
GatewayApplicationCommandPermissionsUpdateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
*/
export interface GatewayApplicationCommandPermissionsUpdateDispatchData {
/**
* ID of the command or the application ID
*/
id: Snowflake;
/**
* ID of the application the command belongs to
*/
application_id: Snowflake;
/**
* ID of the guild
*/
guild_id: Snowflake;
/**
* Permissions for the command in the guild, max of 100
*/
permissions: APIApplicationCommandPermission[];
}
/**
* https://discord.com/developers/docs/topics/gateway#channel-create
* https://discord.com/developers/docs/topics/gateway#channel-update