Skip to content

Updating a message where fields are not stated removes them #352

@Mettwasser

Description

@Mettwasser
msg.edit(
    ctx.into(),
    CreateReply::default().components(...),
)
.await?;

Would remove every attached embed, etc. This is frustrating especially when you do not hold the last embed.

poise/src/reply/mod.rs

Lines 107 to 111 in 518ff05

// Clear builder so that adding embeds or attachments won't add on top of
// the pre-edit items but replace them (which is apparently the more
// intuitive behavior). Notably, setting the builder to default doesn't
// mean the entire message is reset to empty: Discord only updates parts
// of the message that have had a modification specified
states that this is more intuitive, which I don't think is true at all.

To support my opinion:
A sql statement such as UPDATE users SET name = "Jeff" WHERE id = 1 also doesn't set all the other fields besides name to NULL or default.

A change to this behavior would be highly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions