كيف تسوي إمبايد صور في ديسكورد
الإمبايدات شكلها فخم لين ينقطع رابط الصورة. هنا الفرق بين الصورة الكبيرة والصورة المصغّرة، مع أمثلة كود جاهزة.
كيف ديسكورد يحمّل صورة الإمبايد
لما ترسل إمبايد فيه image.url، سيرفرات ديسكورد تطلب الرابط. لازم المضيف يرجع بايتات الصورة مو صفحة HTML.
- setImage — صورة كبيرة تحت الوصف.
- setThumbnail — صورة صغيرة فوق يمين.
باقة السيرفر — الصورة مستضافة على AHD.
جهّز رابط صورة مباشر
- سجّل في AHD Storage.
- ارفع العمل الفني.
- انسخ الرابط الدائم.
discord.js
import { EmbedBuilder } from "discord.js";
const IMAGE = "https://cdn.ahdstg.com/v/YOUR_ID/shop-card.webp";
const THUMB = "https://cdn.ahdstg.com/v/YOUR_ID/icon-64.png";
export function productEmbed() {
return new EmbedBuilder()
.setColor(0xb91c2c)
.setTitle("Desert Pack")
.setThumbnail(THUMB)
.setImage(IMAGE);
}
ويب هوك
curl -H "Content-Type: application/json" -d '{"embeds":[{"title":"New drop","image":{"url":"https://cdn.ahdstg.com/v/YOUR_ID/drop.png"},"color":12124188}]}' "$DISCORD_WEBHOOK_URL"
أسئلة شائعة
وش الفرق بين setImage و setThumbnail؟
صورة كبيرة في الجسم مقابل مصغّرة في الزاوية. الاثنين يحتاجون رابط https مباشر.
ليش صورة الإمبايد فاضي؟
غالباً الرابط مو مباشر أو منتهي. استخدم رابط AHD دائم.
الويب هوك يدعم صور؟
نعم عبر embeds[].image.url.
أدلة ذات صلة
How to Create Discord Image Embeds
Embeds look great until the image URL dies. Learn setImage vs thumbnail, plus working discord.js and webhook code.
How Discord loads embed images
Discord’s servers request image.url. Your host must return image bytes, not an HTML page.
Server pack — image hosted on AHD Storage.
Prepare a direct image URL
- Sign up
- Upload artwork
- Copy the permanent link
discord.js EmbedBuilder
import { EmbedBuilder } from "discord.js";
const IMAGE = "https://cdn.ahdstg.com/v/YOUR_ID/shop-card.webp";
const THUMB = "https://cdn.ahdstg.com/v/YOUR_ID/icon-64.png";
export function productEmbed() {
return new EmbedBuilder().setColor(0xb91c2c).setTitle("Desert Pack").setThumbnail(THUMB).setImage(IMAGE);
}
Webhook JSON
curl -H "Content-Type: application/json" -d '{"embeds":[{"title":"New drop","image":{"url":"https://cdn.ahdstg.com/v/YOUR_ID/drop.png"},"color":12124188}]}' "$DISCORD_WEBHOOK_URL"
FAQ
setImage vs setThumbnail?
Large body image vs small corner thumbnail. Both need a public https direct link.
Why is my embed image blank?
Non-direct or expired URLs. Use a permanent AHD link.
Can webhooks send image embeds?
Yes — set embeds[].image.url.