mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-30 07:20:10 +00:00
refactor: narrow channel gateway events types (#1148)
This commit is contained in:
@@ -707,7 +707,10 @@ export type GatewayChannelModifyDispatch = DataPayload<
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-delete
|
||||
*/
|
||||
export type GatewayChannelModifyDispatchData = APIChannel;
|
||||
export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
type: Exclude<GuildChannelType, ThreadChannelType>;
|
||||
guild_id: Snowflake;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-create
|
||||
@@ -1838,7 +1841,7 @@ export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id
|
||||
*/
|
||||
export type GatewayThreadModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadCreate | GatewayDispatchEvents.ThreadDelete | GatewayDispatchEvents.ThreadUpdate,
|
||||
GatewayChannelModifyDispatchData
|
||||
APIThreadChannel
|
||||
>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -706,7 +706,10 @@ export type GatewayChannelModifyDispatch = DataPayload<
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-delete
|
||||
*/
|
||||
export type GatewayChannelModifyDispatchData = APIChannel;
|
||||
export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
type: Exclude<GuildChannelType, ThreadChannelType>;
|
||||
guild_id: Snowflake;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-create
|
||||
@@ -1837,7 +1840,7 @@ export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id
|
||||
*/
|
||||
export type GatewayThreadModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadCreate | GatewayDispatchEvents.ThreadDelete | GatewayDispatchEvents.ThreadUpdate,
|
||||
GatewayChannelModifyDispatchData
|
||||
APIThreadChannel
|
||||
>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -707,7 +707,10 @@ export type GatewayChannelModifyDispatch = DataPayload<
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-delete
|
||||
*/
|
||||
export type GatewayChannelModifyDispatchData = APIChannel;
|
||||
export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
type: Exclude<GuildChannelType, ThreadChannelType>;
|
||||
guild_id: Snowflake;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-create
|
||||
@@ -1838,7 +1841,7 @@ export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id
|
||||
*/
|
||||
export type GatewayThreadModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadCreate | GatewayDispatchEvents.ThreadDelete | GatewayDispatchEvents.ThreadUpdate,
|
||||
GatewayChannelModifyDispatchData
|
||||
APIThreadChannel
|
||||
>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -706,7 +706,10 @@ export type GatewayChannelModifyDispatch = DataPayload<
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-update
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-delete
|
||||
*/
|
||||
export type GatewayChannelModifyDispatchData = APIChannel;
|
||||
export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
type: Exclude<GuildChannelType, ThreadChannelType>;
|
||||
guild_id: Snowflake;
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#channel-create
|
||||
@@ -1837,7 +1840,7 @@ export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id
|
||||
*/
|
||||
export type GatewayThreadModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ThreadCreate | GatewayDispatchEvents.ThreadDelete | GatewayDispatchEvents.ThreadUpdate,
|
||||
GatewayChannelModifyDispatchData
|
||||
APIThreadChannel
|
||||
>;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user