avoid discord notif bug

send notification for pings in interaction replies
This commit is contained in:
Stachelbeere1248 2025-05-21 16:12:22 +02:00
parent 0e6f4fe56c
commit a742c83499
Signed by: Stachelbeere1248
SSH key fingerprint: SHA256:IozEKdw2dB8TZxkpPdMxcWSoWTIMwoLaCcZJ1AJnY2o

View file

@ -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(())
}