From bd969b96810db67f03c8b2c9f0d705106046772c Mon Sep 17 00:00:00 2001 From: David Thomas Date: Fri, 1 Dec 2023 10:02:35 +0000 Subject: [PATCH] Fix command level ephemeral setting --- src/structs/context.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/structs/context.rs b/src/structs/context.rs index d38a071970cc..809b8d27e4a8 100644 --- a/src/structs/context.rs +++ b/src/structs/context.rs @@ -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); }