const axios = require("axios"); module.exports = { config: { name: "رسم", aliases: ["creart"], version: "1.2", author: "nexo_here", countDown: 5, role: 0, shortDescription: "توليد صور فنية", longDescription: "توليد صور فنية", category: "AI-IMAGE", guide: { en: "{pn} " , ar: "{pn} <الوصف>" } }, onStart: async function ({ message, args }) { const prompt = args.join(" "); if (!prompt) return message.reply("❌ | يرجى إدخال وصف لتوليد الصورة."); // Send waiting message with ⏳ const waiting = await message.reply(`⏳ | جارٍ توليد الصورة لـ: "${prompt}"`); try { const url = `https://smfahim.xyz/creartai?prompt=${encodeURIComponent(prompt)}`; const imgRes = await axios.get(url, { responseType: "stream" }); // Send image with ✅ return message.reply({ body: `✅ | Here is your image for: "${prompt}"`, attachment: imgRes.data }); } catch (error) { console.error("Image generation error:", error.message); return message.reply("❌ | فشل توليد الصورة. حاول لاحقاً."); } } };