#Formatting message to include a user does not ping them

1 messages · Page 1 of 1 (latest)

whole locust
#

The exact same thing works fine in Serenity for whatever reason

#

Hmm ok, I'm using a string function on Serenity instead of doing it manually, so its not exactly the same

Twilight:

content: format!("<@{}>", user.id), embeds: vec![embed.build()]

Serenity:

    ctx.send(|builder| {
        builder
            .embed(|e| {
                *e = embed;
                e
            })
            .content(&user.to_string())
    })
    .await?;
#

Firefox it pings the user
Discord it does not

#

As per #general message I am an idiot
You can delete this post

whole locust
#

After losing my sanity for the rest of this morning and afternoon
Looks like the reason is because it was being deferred

#

So... Now I just need to work out how to defer a message and not have it drop allowedmentions

#

@leaden coral Can I get your help again? xD

leaden coral
#

Huh

#

I haven't tried deferring messages before, at least in twilight

whole locust
#

Ah darn

#

@novel steeple You seem to know what you are doing, so maybe you can help out? 😆

novel steeple
whole locust
novel steeple
#

im not sure what you mean

whole locust
#

Hmm, I'm not setting AllowedMentions anywhere through my application currently

novel steeple
#

you need to, by default no one is pinged

#

its to safeguard against unsanitized input

#

for example if the user doesnt have ping everyone perms but your bot does and the user gets your bot to do it