Skip to content

How to download attachments (file, image) from a message? #66

Answered by rigwild
lschaupp asked this question in Q&A
Discussion options

You must be logged in to vote

You can read the attachments inside a message at the key attachments

See in the Discord documentation, the Message data model

Example image attachment

{
    "id": "1198292395519909948",
    "filename": "2024-01-07_23-28-19.png",
    "size": 10358,
    "url": "https://cdn.discordapp.com/attachments/826934811846377545/1198292395519909948/2024-01-07_23-28-19.png?ex=65be5fc2&is=65abeac2&hm=b4a6d3c271e28969e5ae836c776f3597ceda7b326c24949f30b43a29a7791cde&",
    "proxy_url": "https://media.discordapp.net/attachments/826934811846377545/1198292395519909948/2024-01-07_23-28-19.png?ex=65be5fc2&is=65abeac2&hm=b4a6d3c271e28969e5ae836c776f3597ceda7b326c24949f30b43a29a7791cde&",
    "width": 144,
    "…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rigwild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #63 on January 20, 2024 15:49.