From a78dd012dc475333815f85c50f8c6deba045fa78 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Wed, 8 Oct 2025 09:07:17 +0100 Subject: [PATCH] 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> --- packages/core/src/api/guild.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/packages/core/src/api/guild.ts b/packages/core/src/api/guild.ts index 6648c19ed..afd2ebb8c 100644 --- a/packages/core/src/api/guild.ts +++ b/packages/core/src/api/guild.ts @@ -89,6 +89,8 @@ import { type RESTPostAPIGuildTemplatesJSONBody, type RESTPostAPIGuildTemplatesResult, type RESTPutAPIGuildBanJSONBody, + type RESTPutAPIGuildIncidentActionsJSONBody, + type RESTPutAPIGuildIncidentActionsResult, type RESTPutAPIGuildMemberJSONBody, type RESTPutAPIGuildMemberResult, type RESTPutAPIGuildOnboardingJSONBody, @@ -1439,4 +1441,24 @@ export class GuildsAPI { ) { await this.rest.delete(Routes.guildSoundboardSound(guildId, soundId), { auth, reason, signal }); } + + /** + * 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, + { auth, signal }: Pick = {}, + ) { + return this.rest.put(Routes.guildIncidentActions(guildId), { + auth, + body, + signal, + }) as Promise; + } }