Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
Uploading image to a different channel then link it?
Post Flair (click to view more posts with a particular flair)
Post Body

I have a script that post the same message the user send in a channel in an embed then it deletes the message the user sent. it worked good for me but when they post images the image doesn't work with the bot embed because my script only links the image the user sent and it was removed.

So I want the bot to upload the image the user send in a different channel then it links it in the post. can it be done?

here is the code I'm using.

if msg.channel.id in manon:
        emb = discord.Embed()
        emb.set_author(name="Anonymous", icon_url="image.jpg")
        emb.set_footer(text=msg.created_at.strftime("%d %b %Y %H:%M"))
        emb.description = msg.content
        emb.colour = 274591
        if msg.attachments:
            emb.set_image(url=msg.attachments[0].url)
        await msg.channel.send(embed=emb)
        await msg.delete(delay=0.5)

Comments
[not loaded or deleted]

To add to this, you can also send the image in the embed at the same time without the need to send it to another channel first to get a url. If you send the attachment with the embed and set the image url to "attachments://filename.ext". For example if the filename was "example.jpg", set the embed image url to "attachments://example.jpg" and that will send the attachment in the embed

Author
Account Strength
60%
Account Age
9 years
Verified Email
No
Verified Flair
No
Total Karma
1,320
Link Karma
782
Comment Karma
525
Profile updated: 21 hours ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago