From 61ce329f614d5bc923c3ab4d2b318aa2e66c767b Mon Sep 17 00:00:00 2001 From: codershiba <155646804+codershiba@users.noreply.github.com> Date: Sun, 31 Mar 2024 23:48:51 +0530 Subject: [PATCH] feat(Guild): add `RESTPostAPIGuildBulkBan` result and json body (#910) --- deno/rest/v10/guild.ts | 28 ++++++++++++++++++++++++++++ deno/rest/v9/guild.ts | 28 ++++++++++++++++++++++++++++ rest/v10/guild.ts | 28 ++++++++++++++++++++++++++++ rest/v9/guild.ts | 28 ++++++++++++++++++++++++++++ 4 files changed, 112 insertions(+) diff --git a/deno/rest/v10/guild.ts b/deno/rest/v10/guild.ts index 5e6bd9aad..5571f0e3e 100644 --- a/deno/rest/v10/guild.ts +++ b/deno/rest/v10/guild.ts @@ -604,6 +604,34 @@ export type RESTPutAPIGuildBanResult = never; */ export type RESTDeleteAPIGuildBanResult = never; +/** + * https://discord.com/developers/docs/resources/guild#bulk-guild-ban + */ +export interface RESTPostAPIGuildBulkBanJSONBody { + /** + * List of user ids to ban (max 200) + */ + user_ids: Snowflake[]; + /** + * Number of seconds to delete messages for, between 0 and 604800 (7 days) + */ + delete_message_seconds?: number | undefined; +} + +/** + * https://discord.com/developers/docs/resources/guild#bulk-guild-ban + */ +export interface RESTPostAPIGuildBulkBanResult { + /** + * List of user ids, that were successfully banned + */ + banned_users: Snowflake[]; + /** + * List of user ids, that were not banned + */ + failed_users: Snowflake[]; +} + /** * https://discord.com/developers/docs/resources/guild#get-guild-roles */ diff --git a/deno/rest/v9/guild.ts b/deno/rest/v9/guild.ts index d9928582a..9ab581cc6 100644 --- a/deno/rest/v9/guild.ts +++ b/deno/rest/v9/guild.ts @@ -610,6 +610,34 @@ export type RESTPutAPIGuildBanResult = never; */ export type RESTDeleteAPIGuildBanResult = never; +/** + * https://discord.com/developers/docs/resources/guild#bulk-guild-ban + */ +export interface RESTPostAPIGuildBulkBanJSONBody { + /** + * List of user ids to ban (max 200) + */ + user_ids: Snowflake[]; + /** + * Number of seconds to delete messages for, between 0 and 604800 (7 days) + */ + delete_message_seconds?: number | undefined; +} + +/** + * https://discord.com/developers/docs/resources/guild#bulk-guild-ban + */ +export interface RESTPostAPIGuildBulkBanResult { + /** + * List of user ids, that were successfully banned + */ + banned_users: Snowflake[]; + /** + * List of user ids, that were not banned + */ + failed_users: Snowflake[]; +} + /** * https://discord.com/developers/docs/resources/guild#get-guild-roles */ diff --git a/rest/v10/guild.ts b/rest/v10/guild.ts index 8db028f32..f651d17fe 100644 --- a/rest/v10/guild.ts +++ b/rest/v10/guild.ts @@ -604,6 +604,34 @@ export type RESTPutAPIGuildBanResult = never; */ export type RESTDeleteAPIGuildBanResult = never; +/** + * https://discord.com/developers/docs/resources/guild#bulk-guild-ban + */ +export interface RESTPostAPIGuildBulkBanJSONBody { + /** + * List of user ids to ban (max 200) + */ + user_ids: Snowflake[]; + /** + * Number of seconds to delete messages for, between 0 and 604800 (7 days) + */ + delete_message_seconds?: number | undefined; +} + +/** + * https://discord.com/developers/docs/resources/guild#bulk-guild-ban + */ +export interface RESTPostAPIGuildBulkBanResult { + /** + * List of user ids, that were successfully banned + */ + banned_users: Snowflake[]; + /** + * List of user ids, that were not banned + */ + failed_users: Snowflake[]; +} + /** * https://discord.com/developers/docs/resources/guild#get-guild-roles */ diff --git a/rest/v9/guild.ts b/rest/v9/guild.ts index e1417da9e..732f03b71 100644 --- a/rest/v9/guild.ts +++ b/rest/v9/guild.ts @@ -610,6 +610,34 @@ export type RESTPutAPIGuildBanResult = never; */ export type RESTDeleteAPIGuildBanResult = never; +/** + * https://discord.com/developers/docs/resources/guild#bulk-guild-ban + */ +export interface RESTPostAPIGuildBulkBanJSONBody { + /** + * List of user ids to ban (max 200) + */ + user_ids: Snowflake[]; + /** + * Number of seconds to delete messages for, between 0 and 604800 (7 days) + */ + delete_message_seconds?: number | undefined; +} + +/** + * https://discord.com/developers/docs/resources/guild#bulk-guild-ban + */ +export interface RESTPostAPIGuildBulkBanResult { + /** + * List of user ids, that were successfully banned + */ + banned_users: Snowflake[]; + /** + * List of user ids, that were not banned + */ + failed_users: Snowflake[]; +} + /** * https://discord.com/developers/docs/resources/guild#get-guild-roles */