allow newlines in /say (#569)

Co-authored-by: maskers <97827489+mskrss@users.noreply.github.com>
This commit is contained in:
maskers 2025-06-09 22:55:58 +03:00 committed by GitHub
parent 11fcf0ec6e
commit 2478e5c3d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,6 +16,7 @@ pub async fn say(
#[description = "the message content"] content: String, #[description = "the message content"] content: String,
) -> Result<(), Error> { ) -> Result<(), Error> {
let channel = ctx.channel_id(); let channel = ctx.channel_id();
let content = content.replace("\\n", "\n");
let message = channel.say(ctx, &content).await?; let message = channel.say(ctx, &content).await?;
ctx.say("I said what you said!").await?; ctx.say("I said what you said!").await?;