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

Code before:
   * @property {AttachmentPayload|BufferResolvable|Stream} file The file for the sticker
   * @property {string} name The name for the sticker
   * @property {string} tags The Discord name of a unicode emoji representing the sticker's expression
   * @property {?string} [description] The description for the sticker
   * @property {string} [reason] Reason for creating the sticker
   */

  /**
   * Creates a new custom sticker in the guild.
   * @param {GuildStickerCreateOptions} options Options for creating a guild sticker
   * @returns {Promise<Sticker>} The created sticker
   * @example
   * // Create a new sticker from a URL
   * guild.stickers.create({ file: 'https://i.imgur.com/w3duR07.png', name: 'rip', tags: 'headstone' })
   *   .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
   *   .catch(console.error);
   * @example
   * // Create a new sticker from a file on your computer
   * guild.stickers.create({ file: './memes/banana.png', name: 'banana', tags: 'banana' })
   *   .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
   *   .catch(console.error);
   */
  async create({ file, name, tags, description, reason } = {}) {
    let resolvedFile = await MessagePayload.resolveFile(file);
    if (!resolvedFile) throw new DiscordjsTypeError(ErrorCodes.ReqResourceType);
    resolvedFile = { ...resolvedFile, key: 'file' };

    const body = { name, tags, description: description ?? '' };

    const sticker = await this.client.rest.post(Routes.guildStickers(this.guild.id), {
      appendToFormData: true,
      body,
      files: [resolvedFile],
      reason,
    });
    return this.client.actions.GuildStickerCreate.handle(this.guild, sticker).sticker;
  }

  /**
   * Data that resolves to give a Sticker object. This can be:
   * * A Sticker object
   * * A Snowflake
   * @typedef {Sticker|Snowflake} StickerResolvable
   */

  /**
   * Resolves a StickerResolvable to a Sticker object.
   * @method resolve
   * @memberof GuildStickerManager
   * @instance
   * @param {StickerResolvable} sticker The Sticker resolvable to identify

Review comment (suggestion):
```suggestion
    resolvedFile.key = 'file';
```

Code after:
   * @property {AttachmentPayload|BufferResolvable|Stream} file The file for the sticker
   * @property {string} name The name for the sticker
   * @property {string} tags The Discord name of a unicode emoji representing the sticker's expression
   * @property {?string} [description] The description for the sticker
   * @property {string} [reason] Reason for creating the sticker
   */

  /**
   * Creates a new custom sticker in the guild.
   * @param {GuildStickerCreateOptions} options Options for creating a guild sticker
   * @returns {Promise<Sticker>} The created sticker
   * @example
   * // Create a new sticker from a URL
   * guild.stickers.create({ file: 'https://i.imgur.com/w3duR07.png', name: 'rip', tags: 'headstone' })
   *   .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
   *   .catch(console.error);
   * @example
   * // Create a new sticker from a file on your computer
   * guild.stickers.create({ file: './memes/banana.png', name: 'banana', tags: 'banana' })
   *   .then(sticker => console.log(`Created new sticker with name ${sticker.name}!`))
   *   .catch(console.error);
   */
  async create({ file, name, tags, description, reason } = {}) {
    const resolvedFile = await MessagePayload.resolveFile(file);
    resolvedFile.key = 'file';

    const body = { name, tags, description: description ?? '' };

    const sticker = await this.client.rest.post(Routes.guildStickers(this.guild.id), {
      appendToFormData: true,
      body,
      files: [resolvedFile],
      reason,
    });
    return this.client.actions.GuildStickerCreate.handle(this.guild, sticker).sticker;
  }

  /**
   * Data that resolves to give a Sticker object. This can be:
   * * A Sticker object
   * * A Snowflake
   * @typedef {Sticker|Snowflake} StickerResolvable
   */

  /**
   * Resolves a StickerResolvable to a Sticker object.
   * @method resolve
   * @memberof GuildStickerManager
   * @instance
   * @param {StickerResolvable} sticker The Sticker resolvable to identify
   * @returns {?Sticker}