Skip to content

Commit

Permalink
Fix command level ephemeral setting
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed Dec 1, 2023
1 parent cc068bf commit bd969b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/structs/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,11 @@ context_methods! {
#[allow(unused_mut)] // side effect of how macro works
(reply_builder self builder)
(pub fn reply_builder(self, mut builder: crate::CreateReply) -> crate::CreateReply) {
builder.allowed_mentions = builder.allowed_mentions.or_else(|| self.framework().options().allowed_mentions.clone());
let fw_options = self.framework().options();
builder.ephemeral = builder.ephemeral.or(Some(self.command().ephemeral));
builder.allowed_mentions = builder.allowed_mentions.or_else(|| fw_options.allowed_mentions.clone());

if let Some(callback) = self.framework().options().reply_callback {
if let Some(callback) = fw_options.reply_callback {
builder = callback(self, builder);
}

Expand Down

0 comments on commit bd969b9

Please sign in to comment.