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:
@@ -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<RequestData, 'auth' | 'signal'> = {},
|
||||
) {
|
||||
return this.rest.put(Routes.guildIncidentActions(guildId), {
|
||||
auth,
|
||||
body,
|
||||
signal,
|
||||
}) as Promise<RESTPutAPIGuildIncidentActionsResult>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user