Skip to content

Commit 63dbe48

Browse files
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>
1 parent 67c8953 commit 63dbe48

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@discordjs/ws": "workspace:^",
7171
"@sapphire/snowflake": "^3.5.3",
7272
"@vladfrangu/async_event_emitter": "^2.4.6",
73-
"discord-api-types": "^0.38.24"
73+
"discord-api-types": "^0.38.29"
7474
},
7575
"devDependencies": {
7676
"@discordjs/api-extractor": "workspace:^",

packages/core/src/api/guild.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ import {
9595
type RESTPostAPIGuildsMFAResult,
9696
type RESTPostAPIGuildsResult,
9797
type RESTPutAPIGuildBanJSONBody,
98+
type RESTPutAPIGuildIncidentActionsJSONBody,
99+
type RESTPutAPIGuildIncidentActionsResult,
98100
type RESTPutAPIGuildMemberJSONBody,
99101
type RESTPutAPIGuildMemberResult,
100102
type RESTPutAPIGuildOnboardingJSONBody,
@@ -1359,4 +1361,23 @@ export class GuildsAPI {
13591361
signal,
13601362
}) as Promise<RESTPutAPIGuildOnboardingResult>;
13611363
}
1364+
1365+
/**
1366+
* Modifies incident actions for a guild.
1367+
*
1368+
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-incident-actions}
1369+
* @param guildId - The id of the guild
1370+
* @param body - The data for modifying guild incident actions
1371+
* @param options - The options for modifying guild incident actions
1372+
*/
1373+
public async editIncidentActions(
1374+
guildId: Snowflake,
1375+
body: RESTPutAPIGuildIncidentActionsJSONBody,
1376+
{ signal }: Pick<RequestData, 'signal'> = {},
1377+
) {
1378+
return this.rest.put(Routes.guildIncidentActions(guildId), {
1379+
body,
1380+
signal,
1381+
}) as Promise<RESTPutAPIGuildIncidentActionsResult>;
1382+
}
13621383
}

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)