Repository: discordjs/discord.js
File: packages/discord.js/src/structures/Guild.js (JavaScript)

Code before:
   */
  async delete() {
    await this.client.rest.delete(Routes.guild(this.id));
    return this;
  }

  /**
   * Sets whether this guild's invites are disabled.
   * @param {boolean} [disabled=true] Whether the invites are disabled
   * @returns {Promise<Guild>}
   */
  async disableInvites(disabled = true) {
    const features = this.features.filter(feature => feature !== GuildFeature.InvitesDisabled);
    if (disabled) features.push(GuildFeature.InvitesDisabled);
    return this.edit({ features });
  }

  /**
   * Ban up to 200 users from a guild, and optionally delete previous messages sent by the banned users. Requires
   * both the `BAN_MEMBERS` and `MANAGE_GUILD` permissions.
   * @param {BulkBanOptions} options The options for bulk banning users
   * @returns {Promise<BulkBanResult>} Returns an object with `bannedUsers` key containing the IDs of the banned users
   * and the key `failedUsers` with the IDs that could not be banned or were already banned.
   * @example
   * // Bulk ban users
   * guild.bulkBan({ users: ['84484653687267328'], deleteMessageSeconds: 604_800 })
   *   .catch(console.error);
   */
  async bulkBan(options) {
    if (typeof options !== 'object') throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'options', 'object', true);
    if (!Object.hasOwn(options, 'users')) throw new Error('Object "options" has no "users" attribute');
    const { users } = options;

    if (Array.isArray(users) && users instanceof Collection) throw new Error('"users" is not an array');
    let userIds = users instanceof Collection ? [...users.keys()] : users.map(user => user.id ?? user);
    if (userIds.length === 0) return new Collection();
    const result = await this.client.rest.post(Routes.guildBulkBan(this.id), {
      body: { user_ids: userIds, delete_message_seconds: options.deleteMessageSeconds ?? undefined },
    });
    return { bannedUsers: result.banned_users, failedUsers: result.failed_users };
  }

  /**
   * Whether this guild equals another guild. It compares all properties, so for most operations
   * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often
   * what most users need.
   * @param {Guild} guild The guild to compare with
   * @returns {boolean}
   */
  equals(guild) {
    return (

Review comment (suggestion):
```suggestion
   * guild.bans.bulk({ users: ['84484653687267328'], deleteMessageSeconds: 604_800 })
```

Code after:
   */
  async delete() {
    await this.client.rest.delete(Routes.guild(this.id));
    return this;
  }

  /**
   * Sets whether this guild's invites are disabled.
   * @param {boolean} [disabled=true] Whether the invites are disabled
   * @returns {Promise<Guild>}
   */
  async disableInvites(disabled = true) {
    const features = this.features.filter(feature => feature !== GuildFeature.InvitesDisabled);
    if (disabled) features.push(GuildFeature.InvitesDisabled);
    return this.edit({ features });
  }

  /**
   * Whether this guild equals another guild. It compares all properties, so for most operations
   * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often
   * what most users need.
   * @param {Guild} guild The guild to compare with
   * @returns {boolean}
   */
  equals(guild) {
    return (
      guild &&
      guild instanceof this.constructor &&
      this.id === guild.id &&
      this.available === guild.available &&
      this.splash === guild.splash &&
      this.discoverySplash === guild.discoverySplash &&
      this.name === guild.name &&
      this.memberCount === guild.memberCount &&
      this.large === guild.large &&
      this.icon === guild.icon &&
      this.ownerId === guild.ownerId &&
      this.verificationLevel === guild.verificationLevel &&
      (this.features === guild.features ||
        (this.features.length === guild.features.length &&
          this.features.every((feat, i) => feat === guild.features[i])))
    );
  }

  toJSON() {
    const json = super.toJSON({
      available: false,
      createdTimestamp: true,
      nameAcronym: true,
      presences: false,
      voiceStates: false,