avoid discord notif bug
send notification for pings in interaction replies
This commit is contained in:
parent
0e6f4fe56c
commit
a742c83499
1 changed files with 5 additions and 4 deletions
|
@ -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(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue