Repository: discordjs/discord.js
File: packages/core/src/api/channel.ts (TypeScript)

Code before:
	 * @see {@link https://discord.com/developers/docs/resources/message#edit-message}
	 * @param channelId - The id of the channel the message is in
	 * @param messageId - The id of the message to edit
	 * @param body - The data for editing the message
	 * @param options - The options for editing the message
	 */
	public async editMessage(
		channelId: Snowflake,
		messageId: Snowflake,
		{ files, ...body }: RESTPatchAPIChannelMessageJSONBody & { files?: RawFile[] },
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		return this.rest.patch(Routes.channelMessage(channelId, messageId), {
			files,
			body,
			signal,
		}) as Promise<RESTPatchAPIChannelMessageResult>;
	}

	/**
	 * Fetches the reactions for a message
	 *
	 * @see {@link https://discord.com/developers/docs/resources/message#get-reactions}
	 * @param channelId - The id of the channel the message is in
	 * @param messageId - The id of the message to get the reactions for
	 * @param emoji - The emoji to get the reactions for. Encoding happens internally
	 * @param query - The query options for fetching the reactions
	 * @param options - The options for fetching the message reactions
	 * @example
	 * ```ts
	 * // Unicode.
	 * await api.channels.getMessageReactions('1234567890', '1234567890', '👍');
	 *
	 * // Custom emoji.
	 * await api.channels.getMessageReactions('1234567890', '1234567890', 'emoji_name:1234567890');
	 * ```
	 */
	public async getMessageReactions(
		channelId: Snowflake,
		messageId: Snowflake,
		emoji: string,
		query: RESTGetAPIChannelMessageReactionUsersQuery = {},
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		return this.rest.get(Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), {
			query: makeURLSearchParams(query),
			signal,
		}) as Promise<RESTGetAPIChannelMessageReactionUsersResult>;
	}

	/**

Review comment (suggestion):
I'd make it clearer, what kind of encoding?
```suggestion
	 * @param emoji - The emoji to get the reactions for. URL encoding happens internally
```

Code after:
	 * @see {@link https://discord.com/developers/docs/resources/message#edit-message}
	 * @param channelId - The id of the channel the message is in
	 * @param messageId - The id of the message to edit
	 * @param body - The data for editing the message
	 * @param options - The options for editing the message
	 */
	public async editMessage(
		channelId: Snowflake,
		messageId: Snowflake,
		{ files, ...body }: RESTPatchAPIChannelMessageJSONBody & { files?: RawFile[] },
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		return this.rest.patch(Routes.channelMessage(channelId, messageId), {
			files,
			body,
			signal,
		}) as Promise<RESTPatchAPIChannelMessageResult>;
	}

	/**
	 * Fetches the reactions for a message
	 *
	 * @see {@link https://discord.com/developers/docs/resources/message#get-reactions}
	 * @param channelId - The id of the channel the message is in
	 * @param messageId - The id of the message to get the reactions for
	 * @param emoji - The emoji to get the reactions for. URL encoding happens internally
	 * @param query - The query options for fetching the reactions
	 * @param options - The options for fetching the message reactions
	 * @example
	 * ```ts
	 * // Unicode.
	 * await api.channels.getMessageReactions('1234567890', '1234567890', '👍');
	 *
	 * // Custom emoji.
	 * await api.channels.getMessageReactions('1234567890', '1234567890', 'emoji_name:1234567890');
	 * ```
	 */
	public async getMessageReactions(
		channelId: Snowflake,
		messageId: Snowflake,
		emoji: string,
		query: RESTGetAPIChannelMessageReactionUsersQuery = {},
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		return this.rest.get(Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), {
			query: makeURLSearchParams(query),
			signal,
		}) as Promise<RESTGetAPIChannelMessageReactionUsersResult>;
	}

	/**