Skip to content

Commit

Permalink
feat(APIGuild): add incidents_data
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza committed Jun 5, 2024
1 parent 3ce9610 commit 3a99a5e
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deno/payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,11 @@ export enum MessageType {
StageRaiseHand,
StageTopic,
GuildApplicationPremiumSubscription,

GuildIncidentAlertModeEnabled = 36,
GuildIncidentAlertModeDisabled,
GuildIncidentReportRaid,
GuildIncidentReportFalseAlarm,
}

/**
Expand Down
15 changes: 15 additions & 0 deletions deno/payloads/v10/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -1126,3 +1130,14 @@ 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;
}
15 changes: 15 additions & 0 deletions deno/payloads/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -1118,3 +1122,14 @@ 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;
}
8 changes: 8 additions & 0 deletions deno/rest/v10/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
8 changes: 8 additions & 0 deletions deno/rest/v9/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
5 changes: 5 additions & 0 deletions payloads/v10/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,11 @@ export enum MessageType {
StageRaiseHand,
StageTopic,
GuildApplicationPremiumSubscription,

GuildIncidentAlertModeEnabled = 36,
GuildIncidentAlertModeDisabled,
GuildIncidentReportRaid,
GuildIncidentReportFalseAlarm,
}

/**
Expand Down
15 changes: 15 additions & 0 deletions payloads/v10/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -1126,3 +1130,14 @@ 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;
}
15 changes: 15 additions & 0 deletions payloads/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -1118,3 +1122,14 @@ 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;
}
8 changes: 8 additions & 0 deletions rest/v10/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
8 changes: 8 additions & 0 deletions rest/v9/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 3a99a5e

Please sign in to comment.