From a742c834996bfdaf5f3ad7165c8a3d7214d38096 Mon Sep 17 00:00:00 2001 From: Stachelbeere1248 Date: Wed, 21 May 2025 16:12:22 +0200 Subject: [PATCH] avoid discord notif bug send notification for pings in interaction replies --- src/commands/lfg.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/commands/lfg.rs b/src/commands/lfg.rs index d6709dd..386c171 100644 --- a/src/commands/lfg.rs +++ b/src/commands/lfg.rs @@ -1,4 +1,5 @@ use poise::{ChoiceParameter, CreateReply}; +use serenity::all::CreateMessage; use serenity::all::{CreateAllowedMentions, RoleId}; //from main.rs @@ -102,7 +103,7 @@ pub(crate) async fn lfg( AlienArcadium => Normal, }; - let mut reply_content: String = format!("## <@&{ping}> {current}/{desired} {map_name}",); + let mut reply_content: String = format!("-# LFG by {}\n## <@&{ping}> {current}/{desired} {map_name}", ctx.author()); match difficulty { Normal => {} Difficulty::Hard | Difficulty::Rip => { @@ -116,12 +117,12 @@ pub(crate) async fn lfg( reply_content.push_str(format!("\n**Note:** {note}").as_str()); } } - let reply: CreateReply = CreateReply::default() + + let reply = CreateMessage::default() .content(reply_content) - .ephemeral(false) .allowed_mentions(CreateAllowedMentions::new().roles(vec![ping])); - ctx.send(reply).await?; + ctx.channel_id().send_message(ctx, reply).await?; Ok(()) }