mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
feat(guild): Support incident actions (#11131)
* feat(guild): add incident actions * fix: add result --------- Co-Authored-By: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
"@discordjs/ws": "workspace:^",
|
"@discordjs/ws": "workspace:^",
|
||||||
"@sapphire/snowflake": "^3.5.3",
|
"@sapphire/snowflake": "^3.5.3",
|
||||||
"@vladfrangu/async_event_emitter": "^2.4.6",
|
"@vladfrangu/async_event_emitter": "^2.4.6",
|
||||||
"discord-api-types": "^0.38.24"
|
"discord-api-types": "^0.38.29"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@discordjs/api-extractor": "workspace:^",
|
"@discordjs/api-extractor": "workspace:^",
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ import {
|
|||||||
type RESTPostAPIGuildsMFAResult,
|
type RESTPostAPIGuildsMFAResult,
|
||||||
type RESTPostAPIGuildsResult,
|
type RESTPostAPIGuildsResult,
|
||||||
type RESTPutAPIGuildBanJSONBody,
|
type RESTPutAPIGuildBanJSONBody,
|
||||||
|
type RESTPutAPIGuildIncidentActionsJSONBody,
|
||||||
|
type RESTPutAPIGuildIncidentActionsResult,
|
||||||
type RESTPutAPIGuildMemberJSONBody,
|
type RESTPutAPIGuildMemberJSONBody,
|
||||||
type RESTPutAPIGuildMemberResult,
|
type RESTPutAPIGuildMemberResult,
|
||||||
type RESTPutAPIGuildOnboardingJSONBody,
|
type RESTPutAPIGuildOnboardingJSONBody,
|
||||||
@@ -1359,4 +1361,23 @@ export class GuildsAPI {
|
|||||||
signal,
|
signal,
|
||||||
}) as Promise<RESTPutAPIGuildOnboardingResult>;
|
}) as Promise<RESTPutAPIGuildOnboardingResult>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Modifies incident actions for a guild.
|
||||||
|
*
|
||||||
|
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-incident-actions}
|
||||||
|
* @param guildId - The id of the guild
|
||||||
|
* @param body - The data for modifying guild incident actions
|
||||||
|
* @param options - The options for modifying guild incident actions
|
||||||
|
*/
|
||||||
|
public async editIncidentActions(
|
||||||
|
guildId: Snowflake,
|
||||||
|
body: RESTPutAPIGuildIncidentActionsJSONBody,
|
||||||
|
{ signal }: Pick<RequestData, 'signal'> = {},
|
||||||
|
) {
|
||||||
|
return this.rest.put(Routes.guildIncidentActions(guildId), {
|
||||||
|
body,
|
||||||
|
signal,
|
||||||
|
}) as Promise<RESTPutAPIGuildIncidentActionsResult>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
pnpm-lock.yaml
generated
4
pnpm-lock.yaml
generated
@@ -816,8 +816,8 @@ importers:
|
|||||||
specifier: ^2.4.6
|
specifier: ^2.4.6
|
||||||
version: 2.4.6
|
version: 2.4.6
|
||||||
discord-api-types:
|
discord-api-types:
|
||||||
specifier: ^0.38.24
|
specifier: ^0.38.29
|
||||||
version: 0.38.24
|
version: 0.38.29
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@discordjs/api-extractor':
|
'@discordjs/api-extractor':
|
||||||
specifier: workspace:^
|
specifier: workspace:^
|
||||||
|
|||||||
Reference in New Issue
Block a user