Files
discordeno/packages/plugins/utils/src/sendPrivateInteractionResponse.ts
2022-12-02 13:18:03 +08:00

13 lines
437 B
TypeScript

import type { BigString, Bot, InteractionResponse } from '@discordeno/bot'
/** sendInteractionResponse with ephemeral reply */
export async function sendPrivateInteractionResponse (
bot: Bot,
id: BigString,
token: string,
options: InteractionResponse
): Promise<void> {
if (options.data && !options.data?.flags) options.data.flags = 64 // private: true
return await bot.helpers.sendInteractionResponse(id, token, options)
}