Repository: discordjs/discord.js
File: packages/rest/src/lib/CDN.ts (TypeScript)

Code before:
	 *
	 * @param index - The default avatar index
	 * @remarks
	 * To calculate the index for a user do `(userId >> 22) % 6`,
	 * or `discriminator % 5` if they're using the legacy username system.
	 */
	public defaultAvatar(index: number): string {
		return this.makeURL(`/embed/avatars/${index}`, { extension: 'png' });
	}

	/**
	 * Generates a discovery splash URL for a guild's discovery splash.
	 *
	 * @param guildId - The guild id that has the discovery splash
	 * @param splashHash - The hash provided by Discord for this splash
	 * @param options - Optional options for the splash
	 */
	public discoverySplash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {
		return this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);
	}

	/**
	 * Generates an emoji's URL.
	 *
	 * @param emojiId - The emoji id
  	 * @param animated - Indicates whether the emoji is animated or not
	 * @param options - Optional options for the emoji
	 */
	public emoji(emojiId: string, animated: boolean, options?: Readonly<ImageURLOptions>): string {
		return this.dynamicMakeURL(`/emojis/${emojiId}`, animated ? 'a_' : '', options);
	}

	/**
	 * Generates a guild member avatar URL.
	 *
	 * @param guildId - The id of the guild
	 * @param userId - The id of the user
	 * @param avatarHash - The hash provided by Discord for this avatar
	 * @param options - Optional options for the avatar
	 */
	public guildMemberAvatar(
		guildId: string,
		userId: string,
		avatarHash: string,
		options?: Readonly<ImageURLOptions>,
	): string {
		return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);
	}

	/**
	 * Generates a guild member banner URL.

Review comment (suggestion):
```suggestion
	 * @param animated - Whether the emoji is animated
```

Code after:
	 *
	 * @param index - The default avatar index
	 * @remarks
	 * To calculate the index for a user do `(userId >> 22) % 6`,
	 * or `discriminator % 5` if they're using the legacy username system.
	 */
	public defaultAvatar(index: number): string {
		return this.makeURL(`/embed/avatars/${index}`, { extension: 'png' });
	}

	/**
	 * Generates a discovery splash URL for a guild's discovery splash.
	 *
	 * @param guildId - The guild id that has the discovery splash
	 * @param splashHash - The hash provided by Discord for this splash
	 * @param options - Optional options for the splash
	 */
	public discoverySplash(guildId: string, splashHash: string, options?: Readonly<BaseImageURLOptions>): string {
		return this.makeURL(`/discovery-splashes/${guildId}/${splashHash}`, options);
	}

	/**
	 * Generates an emoji's URL.
	 *
	 * @param emojiId - The emoji id
	 * @param animated - Whether the emoji is animated
	 * @param options - Optional options for the emoji
	 */
	public emoji(emojiId: string, animated: boolean, options?: Readonly<ImageURLOptions>): string {
		return this.dynamicMakeURL(`/emojis/${emojiId}`, animated ? 'a_' : '', options);
	}

	/**
	 * Generates a guild member avatar URL.
	 *
	 * @param guildId - The id of the guild
	 * @param userId - The id of the user
	 * @param avatarHash - The hash provided by Discord for this avatar
	 * @param options - Optional options for the avatar
	 */
	public guildMemberAvatar(
		guildId: string,
		userId: string,
		avatarHash: string,
		options?: Readonly<ImageURLOptions>,
	): string {
		return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);
	}

	/**
	 * Generates a guild member banner URL.