Skip to content

How to edit message with replacing attached image in it? #936

@maxsupermanhd

Description

@maxsupermanhd

For example:

-H "Authorization: Bot <sometoken>" \
-H "User-Agent: someBot (site, v0.1)" \
-H "Content-Type: multipart/form-data" \
-X PATCH \
-F 'file1=@/opt/result.png;filename="Attach1.png"' \
-F "payload_json=$(generate_post_data)" \
https://discordapp.com/api/channels/<someid>/messages/<anotherid>

But this method not working! Responding with {"_misc": ["Expected \"Content-Type\" header to be one of set(['application/json'])."]}
PS $(generate_post_data) generates also embed with "image": {"url": "attachment://Attach1.png"}

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