Repository: discordjs/discord.js
File: packages/discord.js/src/managers/GuildMemberManager.js (JavaScript)

Code before:
    const clone = this.cache.get(id)?._clone();
    clone?._patch(data);
    return clone ?? this._add(data, false);
  }

  /**
   * The data for editing the current application's guild member.
   *
   * @typedef {Object} GuildMemberEditCurrentOptions
   * @property {?string} [nick] The nickname to set
   * @property {?(BufferResolvable|Base64Resolvable)} [icon] The icon to set
   * @property {?(BufferResolvable|Base64Resolvable)} [banner] The banner to set
   * @property {string} [reason] The reason to use
   */

  /**
   * Edits the current application's guild member in a guild.
   *
   * @param {GuildMemberEditCurrentOptions} options The options to provide
   * @returns {Promise<GuildMember>}
   */
  async editCurrent({ reason, ...options }) {
    const data = await this.client.rest.patch(Routes.guildMember(this.guild.id, '@me'), {
      body: {
        ...options,
        icon: options.icon && (await resolveImage(options.icon)),
        banner: options.banner && (await resolveImage(options.banner)),
      },
      reason,
    });

    const clone = this.me?._clone();
    clone?._patch(data);
    return clone ?? this._add(data, false);
  }

  /**
   * Options used for pruning guild members.
   * <info>It's recommended to set {@link GuildPruneMembersOptions#count options.count}
   * to `false` for large guilds.</info>
   *
   * @typedef {Object} GuildPruneMembersOptions
   * @property {number} [days] Number of days of inactivity required to kick
   * @property {boolean} [dry=false] Get the number of users that will be kicked, without actually kicking them
   * @property {boolean} [count] Whether or not to return the number of users that have been kicked.
   * @property {RoleResolvable[]} [roles] Array of roles to bypass the "...and no roles" constraint when pruning
   * @property {string} [reason] Reason for this prune
   */

  /**
   * Prunes members from the guild based on how long they have been inactive.

Review comment (suggestion):
Shouldn't this be `avatar` instead of `icon`? 
The pending Discord API docs points to it being `avatar`: 
https://github.com/discord/discord-api-docs/pull/7807/files#diff-b048a45b363d01dbbaeaf7409be45b8faec5386ce0cc3e889208c737c534855fR1022

Code after:
    const clone = this.cache.get(id)?._clone();
    clone?._patch(data);
    return clone ?? this._add(data, false);
  }

  /**
   * The data for editing the current application's guild member.
   *
   * @typedef {Object} GuildMemberEditMeOptions
   * @property {?string} [nick] The nickname to set
   * @property {?(BufferResolvable|Base64Resolvable)} [banner] The banner to set
   * @property {?(BufferResolvable|Base64Resolvable)} [avatar] The avatar to set
   * @property {?string} [bio] The bio to set
   * @property {string} [reason] The reason to use
   */

  /**
   * Edits the current application's guild member in a guild.
   *
   * @param {GuildMemberEditMeOptions} options The options to provide
   * @returns {Promise<GuildMember>}
   */
  async editMe({ reason, ...options }) {
    const data = await this.client.rest.patch(Routes.guildMember(this.guild.id, '@me'), {
      body: {
        ...options,
        banner: options.banner && (await resolveImage(options.banner)),
        avatar: options.avatar && (await resolveImage(options.avatar)),
      },
      reason,
    });

    const clone = this.me?._clone();
    clone?._patch(data);
    return clone ?? this._add(data, false);
  }

  /**
   * Options used for pruning guild members.
   * <info>It's recommended to set {@link GuildPruneMembersOptions#count options.count}
   * to `false` for large guilds.</info>
   *
   * @typedef {Object} GuildPruneMembersOptions
   * @property {number} [days] Number of days of inactivity required to kick
   * @property {boolean} [dry=false] Get the number of users that will be kicked, without actually kicking them
   * @property {boolean} [count] Whether or not to return the number of users that have been kicked.
   * @property {RoleResolvable[]} [roles] Array of roles to bypass the "...and no roles" constraint when pruning
   * @property {string} [reason] Reason for this prune
   */

  /**