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

Code before:
		interactionToken: string,
		body: APIInteractionResponseCallbackData &
			RESTPostAPIInteractionCallbackQuery & { files?: RawFile[]; with_response?: false },
		options?: Pick<RequestData, 'signal'>,
	): Promise<void>;

	/**
	 * Replies to an interaction
	 *
	 * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
	 * @param interactionId - The id of the interaction
	 * @param interactionToken - The token of the interaction
	 * @param body - The callback data for replying
	 * @param options - The options for replying
	 */
	public async reply(
		interactionId: Snowflake,
		interactionToken: string,
		{
			files,
			with_response,
			...data
		}: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & { files?: RawFile[] },
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		return this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
			query: makeURLSearchParams({ with_response }),
			files,
			auth: false,
			body: {
				type: InteractionResponseType.ChannelMessageWithSource,
				data,
			},
			signal,
		});
	}

	/**
	 * Defers the reply to an interaction and returns an interaction callback object
	 *
	 * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
	 * @param interactionId - The id of the interaction
	 * @param interactionToken - The token of the interaction
	 * @param body - The callback data for deferring the reply
	 * @param options - The options for deferring
	 */
	public async defer(
		interactionId: Snowflake,
		interactionToken: string,
		body: APIInteractionResponseDeferredChannelMessageWithSource['data'] &
			RESTPostAPIInteractionCallbackQuery & { with_response: true },

Review comment (suggestion):
This will return an `ArrayBuffer`(?) when `with_response=false` (or not passed).

Perhaps something like this could work:
```ts
		const result = await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
			// ...
		});

		return with_response ? result : undefined;
```

The same applies to the other methods that were changed in this class 


Code after:
		interactionToken: string,
		body: APIInteractionResponseCallbackData &
			RESTPostAPIInteractionCallbackQuery & { files?: RawFile[]; with_response?: false },
		options?: Pick<RequestData, 'signal'>,
	): Promise<undefined>;

	public async reply(
		interactionId: Snowflake,
		interactionToken: string,
		{
			files,
			with_response,
			...data
		}: APIInteractionResponseCallbackData & RESTPostAPIInteractionCallbackQuery & { files?: RawFile[] },
		{ signal }: Pick<RequestData, 'signal'> = {},
	) {
		const response = await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
			query: makeURLSearchParams({ with_response }),
			files,
			auth: false,
			body: {
				type: InteractionResponseType.ChannelMessageWithSource,
				data,
			},
			signal,
		});

		return with_response ? response : undefined;
	}

	/**
	 * Defers the reply to an interaction and returns an interaction callback object
	 *
	 * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}
	 * @param interactionId - The id of the interaction
	 * @param interactionToken - The token of the interaction
	 * @param body - The callback data for deferring the reply
	 * @param options - The options for deferring
	 */
	public async defer(
		interactionId: Snowflake,
		interactionToken: string,
		body: APIInteractionResponseDeferredChannelMessageWithSource['data'] &
			RESTPostAPIInteractionCallbackQuery & { with_response: true },
		options?: Pick<RequestData, 'signal'>,
	): Promise<RESTPostAPIInteractionCallbackWithResponseResult>;

	/**
	 * Defers the reply to an interaction
	 *
	 * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}