mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
fix(bot): don't override flags when isPrivate (#4191)
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
This commit is contained in:
@@ -39,7 +39,10 @@ export const baseInteraction: InternalBot['transformers']['$inferredTypes']['int
|
||||
// If user provides an object, determine if it should be an autocomplete or a modal response
|
||||
if (response.title) type = InteractionResponseTypes.Modal
|
||||
if (this.type === InteractionTypes.ApplicationCommandAutocomplete) type = InteractionResponseTypes.ApplicationCommandAutocompleteResult
|
||||
if (type === InteractionResponseTypes.ChannelMessageWithSource && options?.isPrivate) response.flags = MessageFlags.Ephemeral
|
||||
if (type === InteractionResponseTypes.ChannelMessageWithSource && options?.isPrivate) {
|
||||
response.flags ??= 0
|
||||
response.flags |= MessageFlags.Ephemeral
|
||||
}
|
||||
|
||||
// Since this has already been given a response, any further responses must be followups.
|
||||
if (this.acknowledged) return await this.bot.helpers.sendFollowupMessage(this.token, response)
|
||||
|
||||
Reference in New Issue
Block a user