fix: make /opt-in and /opt-out's responses ephemeral
This commit is contained in:
@@ -5,6 +5,7 @@ use twilight_model::{
|
|||||||
command::{Command, CommandType},
|
command::{Command, CommandType},
|
||||||
interaction::Interaction,
|
interaction::Interaction,
|
||||||
},
|
},
|
||||||
|
channel::message::MessageFlags,
|
||||||
http::interaction::{InteractionResponse, InteractionResponseType},
|
http::interaction::{InteractionResponse, InteractionResponseType},
|
||||||
};
|
};
|
||||||
use twilight_util::builder::{InteractionResponseDataBuilder, command::CommandBuilder};
|
use twilight_util::builder::{InteractionResponseDataBuilder, command::CommandBuilder};
|
||||||
@@ -79,6 +80,7 @@ pub async fn handle(state: State, interaction: Interaction) {
|
|||||||
.content(format!(
|
.content(format!(
|
||||||
"opted you in, your previous consent was {previous_consent:?}"
|
"opted you in, your previous consent was {previous_consent:?}"
|
||||||
))
|
))
|
||||||
|
.flags(MessageFlags::EPHEMERAL)
|
||||||
.build(),
|
.build(),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ use twilight_model::{
|
|||||||
command::{Command, CommandType},
|
command::{Command, CommandType},
|
||||||
interaction::Interaction,
|
interaction::Interaction,
|
||||||
},
|
},
|
||||||
|
channel::message::MessageFlags,
|
||||||
http::interaction::{InteractionResponse, InteractionResponseType},
|
http::interaction::{InteractionResponse, InteractionResponseType},
|
||||||
};
|
};
|
||||||
use twilight_util::builder::{InteractionResponseDataBuilder, command::CommandBuilder};
|
use twilight_util::builder::{InteractionResponseDataBuilder, command::CommandBuilder};
|
||||||
@@ -79,6 +80,7 @@ pub async fn handle(state: State, interaction: Interaction) {
|
|||||||
.content(format!(
|
.content(format!(
|
||||||
"opted you out, your previous consent was {previous_consent:?}"
|
"opted you out, your previous consent was {previous_consent:?}"
|
||||||
))
|
))
|
||||||
|
.flags(MessageFlags::EPHEMERAL)
|
||||||
.build(),
|
.build(),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user