Skip to content

Commit

Permalink
feat(Guild): add RESTPostAPIGuildBulkBan result and json body (#910)
Browse files Browse the repository at this point in the history
  • Loading branch information
codershiba committed Mar 31, 2024
1 parent 7dcad58 commit 61ce329
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 0 deletions.
28 changes: 28 additions & 0 deletions deno/rest/v10/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
28 changes: 28 additions & 0 deletions deno/rest/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
28 changes: 28 additions & 0 deletions rest/v10/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
28 changes: 28 additions & 0 deletions rest/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 61ce329

Please sign in to comment.