diff --git a/src/feature/help/handler.rs b/src/feature/help/handler.rs index 49e1ada..441d421 100644 --- a/src/feature/help/handler.rs +++ b/src/feature/help/handler.rs @@ -122,6 +122,9 @@ pub fn components() -> Vec { /// Handles `help:category` select. Edits the original help message. pub async fn on_select(ctx: Context, interaction: ComponentInteraction) { + // UpdateMessage always replaces attachments, so the overview re-uploads its banner; + // category pages carry no image and simply drop it. + let home = interaction.data.custom_id == "help:home"; let embed = match interaction.data.custom_id.as_str() { "help:home" => main_embed("!", &interaction.user.name, None), "help:category" => { @@ -136,17 +139,14 @@ pub async fn on_select(ctx: Context, interaction: ComponentInteraction) { } _ => return, }; - // Edit original message via UpdateMessage response - let _ = interaction - .create_response( - &ctx.http, - CreateInteractionResponse::UpdateMessage( - serenity::all::CreateInteractionResponseMessage::new() - .embed(embed) - .components(components()), - ), - ) - .await; + let mut msg = serenity::all::CreateInteractionResponseMessage::new() + .embed(embed) + .components(components()); + if home { + msg = msg.add_file(brand::Banner::Help.attachment()); + } + let _ = + interaction.create_response(&ctx.http, CreateInteractionResponse::UpdateMessage(msg)).await; } /// Helper for command.rs to build main page. diff --git a/src/feature/ticket/handler/mod.rs b/src/feature/ticket/handler/mod.rs index ed6a577..c20ea82 100644 --- a/src/feature/ticket/handler/mod.rs +++ b/src/feature/ticket/handler/mod.rs @@ -7,8 +7,8 @@ pub mod interaction; pub use interaction::on_select; use serenity::all::{ - ChannelId, Context, CreateActionRow, CreateEmbed, CreateSelectMenu, CreateSelectMenuKind, - CreateSelectMenuOption, GuildId, + ChannelId, Context, CreateActionRow, CreateEmbed, CreateEmbedFooter, CreateSelectMenu, + CreateSelectMenuKind, CreateSelectMenuOption, GuildId, }; use tracing::info; @@ -58,9 +58,7 @@ pub fn panel_embed() -> CreateEmbed { • Abuse / spam → blacklist.", ) .color(crate::util::brand::ACCENT) - .footer(serenity::all::CreateEmbedFooter::new( - "Loki Dev • Select topic → fill form → ticket created", - )) + .footer(CreateEmbedFooter::new("Loki Dev • Select topic → fill form → ticket created")) } pub fn panel_select_row() -> CreateActionRow {