Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(APIGuild): add incidents_data
Browse files Browse the repository at this point in the history
sdanialraza committed Jul 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 2049dde commit ff448e1
Showing 8 changed files with 124 additions and 0 deletions.
23 changes: 23 additions & 0 deletions deno/payloads/v10/guild.ts
Original file line number Diff line number Diff line change
@@ -280,6 +280,10 @@ export interface APIGuild extends APIPartialGuild {
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
*/
safety_alerts_channel_id: Snowflake | null;
/**
* The incidents data for this guild
*/
incidents_data: APIIncidentsData | null;
}

/**
@@ -1126,3 +1130,22 @@ export enum GuildOnboardingPromptType {
MultipleChoice,
Dropdown,
}

export interface APIIncidentsData {
/**
* When invites get enabled again
*/
invites_disabled_until: string | null;
/**
* When direct messages get enabled again
*/
dms_disabled_until: string | null;
/**
* When the dm spam was detected at
*/
dm_spam_detected_at: string | null;
/**
* When the raid was detected at
*/
raid_detected_at: string | null;
}
23 changes: 23 additions & 0 deletions deno/payloads/v9/guild.ts
Original file line number Diff line number Diff line change
@@ -280,6 +280,10 @@ export interface APIGuild extends APIPartialGuild {
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
*/
safety_alerts_channel_id: Snowflake | null;
/**
* The incidents data for this guild
*/
incidents_data: APIIncidentsData | null;
}

/**
@@ -1118,3 +1122,22 @@ export enum GuildOnboardingPromptType {
MultipleChoice,
Dropdown,
}

export interface APIIncidentsData {
/**
* When invites get enabled again
*/
invites_disabled_until: string | null;
/**
* When direct messages get enabled again
*/
dms_disabled_until: string | null;
/**
* When the dm spam was detected at
*/
dm_spam_detected_at: string | null;
/**
* When the raid was detected at
*/
raid_detected_at: string | null;
}
8 changes: 8 additions & 0 deletions deno/rest/v10/mod.ts
Original file line number Diff line number Diff line change
@@ -919,6 +919,14 @@ export const Routes = {
return `/guilds/${guildId}/onboarding` as const;
},

/**
* Route for:
* - PUT `/guilds/${guild.id}/incident-actions`
*/
guildIncidentActions(guildId: Snowflake) {
return `/guilds/${guildId}/incident-actions` as const;
},

/**
* Route for:
* - GET `/applications/@me`
8 changes: 8 additions & 0 deletions deno/rest/v9/mod.ts
Original file line number Diff line number Diff line change
@@ -928,6 +928,14 @@ export const Routes = {
return `/guilds/${guildId}/onboarding` as const;
},

/**
* Route for:
* - PUT `/guilds/${guild.id}/incident-actions`
*/
guildIncidentActions(guildId: Snowflake) {
return `/guilds/${guildId}/incident-actions` as const;
},

/**
* Route for:
* - GET `/applications/@me`
23 changes: 23 additions & 0 deletions payloads/v10/guild.ts
Original file line number Diff line number Diff line change
@@ -280,6 +280,10 @@ export interface APIGuild extends APIPartialGuild {
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
*/
safety_alerts_channel_id: Snowflake | null;
/**
* The incidents data for this guild
*/
incidents_data: APIIncidentsData | null;
}

/**
@@ -1126,3 +1130,22 @@ export enum GuildOnboardingPromptType {
MultipleChoice,
Dropdown,
}

export interface APIIncidentsData {
/**
* When invites get enabled again
*/
invites_disabled_until: string | null;
/**
* When direct messages get enabled again
*/
dms_disabled_until: string | null;
/**
* When the dm spam was detected at
*/
dm_spam_detected_at: string | null;
/**
* When the raid was detected at
*/
raid_detected_at: string | null;
}
23 changes: 23 additions & 0 deletions payloads/v9/guild.ts
Original file line number Diff line number Diff line change
@@ -280,6 +280,10 @@ export interface APIGuild extends APIPartialGuild {
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
*/
safety_alerts_channel_id: Snowflake | null;
/**
* The incidents data for this guild
*/
incidents_data: APIIncidentsData | null;
}

/**
@@ -1118,3 +1122,22 @@ export enum GuildOnboardingPromptType {
MultipleChoice,
Dropdown,
}

export interface APIIncidentsData {
/**
* When invites get enabled again
*/
invites_disabled_until: string | null;
/**
* When direct messages get enabled again
*/
dms_disabled_until: string | null;
/**
* When the dm spam was detected at
*/
dm_spam_detected_at: string | null;
/**
* When the raid was detected at
*/
raid_detected_at: string | null;
}
8 changes: 8 additions & 0 deletions rest/v10/index.ts
Original file line number Diff line number Diff line change
@@ -919,6 +919,14 @@ export const Routes = {
return `/guilds/${guildId}/onboarding` as const;
},

/**
* Route for:
* - PUT `/guilds/${guild.id}/incident-actions`
*/
guildIncidentActions(guildId: Snowflake) {
return `/guilds/${guildId}/incident-actions` as const;
},

/**
* Route for:
* - GET `/applications/@me`
8 changes: 8 additions & 0 deletions rest/v9/index.ts
Original file line number Diff line number Diff line change
@@ -928,6 +928,14 @@ export const Routes = {
return `/guilds/${guildId}/onboarding` as const;
},

/**
* Route for:
* - PUT `/guilds/${guild.id}/incident-actions`
*/
guildIncidentActions(guildId: Snowflake) {
return `/guilds/${guildId}/incident-actions` as const;
},

/**
* Route for:
* - GET `/applications/@me`

0 comments on commit ff448e1

Please sign in to comment.