mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +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:^",
|
||||
"@sapphire/snowflake": "^3.5.3",
|
||||
"@vladfrangu/async_event_emitter": "^2.4.6",
|
||||
"discord-api-types": "^0.38.24"
|
||||
"discord-api-types": "^0.38.29"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
|
||||
@@ -95,6 +95,8 @@ import {
|
||||
type RESTPostAPIGuildsMFAResult,
|
||||
type RESTPostAPIGuildsResult,
|
||||
type RESTPutAPIGuildBanJSONBody,
|
||||
type RESTPutAPIGuildIncidentActionsJSONBody,
|
||||
type RESTPutAPIGuildIncidentActionsResult,
|
||||
type RESTPutAPIGuildMemberJSONBody,
|
||||
type RESTPutAPIGuildMemberResult,
|
||||
type RESTPutAPIGuildOnboardingJSONBody,
|
||||
@@ -1359,4 +1361,23 @@ export class GuildsAPI {
|
||||
signal,
|
||||
}) 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>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user