Replies: 2 comments
-
You need to check if the message has attachments. For example: if message.attachments:
for attachment in message.attachments:
send_message(content=attachment.url, username=..., user_avatar=..., webhook=...) |
Beta Was this translation helpful? Give feedback.
0 replies
-
the bot is working for some images but not for some, I am so confused. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I was using for cloning my one server to another, the bot used to work fine until few days back when it just stopped sending images. It works fine for messages including gifs tho.
Reproduction Steps
Still figuring it out.
Code
No response
Expected Results
import discord
import json
import requests
#just sharing the imp part
def send_message(content, username, user_avatar, webhook):
data = {
"content": content,
"username": username,
"avatar_url": user_avatar
}
response = requests.post(webhook, json=data)
return True
Actual Results
should send the images (content)
System Information
Running on pc / replit / heroku.
Same issue all places
Checklist
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions