From 48e92d1736df8814fd6abf80623dc76ee22a5187 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sat, 25 Apr 2026 20:58:35 -0400 Subject: [PATCH] fix: make `/opt-in` and `/opt-out`'s responses ephemeral --- src/command/opt_in.rs | 2 ++ src/command/opt_out.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/command/opt_in.rs b/src/command/opt_in.rs index c8611b6..c2501d1 100644 --- a/src/command/opt_in.rs +++ b/src/command/opt_in.rs @@ -5,6 +5,7 @@ use twilight_model::{ command::{Command, CommandType}, interaction::Interaction, }, + channel::message::MessageFlags, http::interaction::{InteractionResponse, InteractionResponseType}, }; use twilight_util::builder::{InteractionResponseDataBuilder, command::CommandBuilder}; @@ -79,6 +80,7 @@ pub async fn handle(state: State, interaction: Interaction) { .content(format!( "opted you in, your previous consent was {previous_consent:?}" )) + .flags(MessageFlags::EPHEMERAL) .build(), ), }, diff --git a/src/command/opt_out.rs b/src/command/opt_out.rs index bcf19d1..5ff4f03 100644 --- a/src/command/opt_out.rs +++ b/src/command/opt_out.rs @@ -5,6 +5,7 @@ use twilight_model::{ command::{Command, CommandType}, interaction::Interaction, }, + channel::message::MessageFlags, http::interaction::{InteractionResponse, InteractionResponseType}, }; use twilight_util::builder::{InteractionResponseDataBuilder, command::CommandBuilder}; @@ -79,6 +80,7 @@ pub async fn handle(state: State, interaction: Interaction) { .content(format!( "opted you out, your previous consent was {previous_consent:?}" )) + .flags(MessageFlags::EPHEMERAL) .build(), ), },