Spaces:
Paused
Paused
πππ₯π₯πππ π π¨ππππ₯π β‘
commited on
Update ai-flux.js
Browse files- plugins/ai-flux.js +1 -52
plugins/ai-flux.js
CHANGED
|
@@ -1,52 +1 @@
|
|
| 1 |
-
|
| 2 |
-
const config = require('../config');
|
| 3 |
-
const { cmd, commands } = require('../command');
|
| 4 |
-
const { fetchJson } = require('../lib/functions');
|
| 5 |
-
|
| 6 |
-
cmd({
|
| 7 |
-
pattern: "fluxai",
|
| 8 |
-
alias: ["flux", "imagine"],
|
| 9 |
-
react: "π",
|
| 10 |
-
desc: "Generate an image using AI.",
|
| 11 |
-
category: "main",
|
| 12 |
-
filename: __filename
|
| 13 |
-
}, async (conn, mek, m, {
|
| 14 |
-
from,
|
| 15 |
-
quoted,
|
| 16 |
-
body,
|
| 17 |
-
isCmd,
|
| 18 |
-
command,
|
| 19 |
-
args,
|
| 20 |
-
q,
|
| 21 |
-
isGroup,
|
| 22 |
-
sender,
|
| 23 |
-
senderNumber,
|
| 24 |
-
botNumber2,
|
| 25 |
-
botNumber,
|
| 26 |
-
pushname,
|
| 27 |
-
isMe,
|
| 28 |
-
isOwner,
|
| 29 |
-
groupMetadata,
|
| 30 |
-
groupName,
|
| 31 |
-
participants,
|
| 32 |
-
groupAdmins,
|
| 33 |
-
isBotAdmins,
|
| 34 |
-
isAdmins,
|
| 35 |
-
reply
|
| 36 |
-
}) => {
|
| 37 |
-
try {
|
| 38 |
-
if (!q) return reply("Please provide a prompt for the image.");
|
| 39 |
-
|
| 40 |
-
// Indicate processing of user request
|
| 41 |
-
await reply("> *Subzero Brewing Your Magical image...πͺβ¨*");
|
| 42 |
-
|
| 43 |
-
// Generate and send requested image
|
| 44 |
-
let data = await fetchJson(`https://api.giftedtech.web.id/api/ai/fluximg?apikey=gifted&prompt=${q}`);
|
| 45 |
-
const imageUrl = data.result;
|
| 46 |
-
await conn.sendMessage(m.chat, { image: { url: imageUrl } });
|
| 47 |
-
|
| 48 |
-
} catch (error) {
|
| 49 |
-
console.error(error);
|
| 50 |
-
reply(`An error occurred: ${error.message}`);
|
| 51 |
-
}
|
| 52 |
-
});
|
|
|
|
| 1 |
+
const _0x5ae45c=_0x54e9;(function(_0x309a5b,_0x11216c){const _0x2e40c5=_0x54e9,_0x138e6c=_0x309a5b();while(!![]){try{const _0xcdfd85=-parseInt(_0x2e40c5(0x1e4))/0x1+parseInt(_0x2e40c5(0x1d0))/0x2*(-parseInt(_0x2e40c5(0x1d5))/0x3)+parseInt(_0x2e40c5(0x1d8))/0x4+-parseInt(_0x2e40c5(0x1df))/0x5*(parseInt(_0x2e40c5(0x1dd))/0x6)+-parseInt(_0x2e40c5(0x1de))/0x7*(-parseInt(_0x2e40c5(0x1d7))/0x8)+-parseInt(_0x2e40c5(0x1d3))/0x9+parseInt(_0x2e40c5(0x1cf))/0xa;if(_0xcdfd85===_0x11216c)break;else _0x138e6c['push'](_0x138e6c['shift']());}catch(_0x5f3c18){_0x138e6c['push'](_0x138e6c['shift']());}}}(_0x5798,0xce956));function hi(){const _0x25a3c8=_0x54e9;console[_0x25a3c8(0x1e2)]('Hello\x20World!');}hi();const config=require(_0x5ae45c(0x1e1)),{cmd,commands}=require(_0x5ae45c(0x1dc)),{fetchJson}=require('../lib/functions');function _0x54e9(_0x1f3466,_0x21c089){const _0x5798ea=_0x5798();return _0x54e9=function(_0x54e968,_0x28e8d2){_0x54e968=_0x54e968-0x1cf;let _0x2cb7e5=_0x5798ea[_0x54e968];return _0x2cb7e5;},_0x54e9(_0x1f3466,_0x21c089);}cmd({'pattern':_0x5ae45c(0x1d2),'alias':[_0x5ae45c(0x1db),'imagine'],'react':'π','desc':_0x5ae45c(0x1da),'category':_0x5ae45c(0x1d1),'filename':__filename},async(_0x48b082,_0x486db1,_0x3b2083,{from:_0x108a1d,quoted:_0x4e7e1e,body:_0x230286,isCmd:_0x3212ae,command:_0x538351,args:_0x42261f,q:_0x508ea8,isGroup:_0x2dbf9a,sender:_0x1fa0c9,senderNumber:_0x1efabc,botNumber2:_0x1cd073,botNumber:_0xa25224,pushname:_0x491301,isMe:_0x24f822,isOwner:_0x46473f,groupMetadata:_0x39fc2a,groupName:_0x2f4dd7,participants:_0x253e82,groupAdmins:_0x1a4c4f,isBotAdmins:_0x404cd9,isAdmins:_0x311ee1,reply:_0x4e71a9})=>{const _0xd9bca6=_0x5ae45c;try{if(!_0x508ea8)return _0x4e71a9('Please\x20provide\x20a\x20prompt\x20for\x20the\x20image.');await _0x4e71a9(_0xd9bca6(0x1d6));let _0x3875ec=await fetchJson(_0xd9bca6(0x1d4)+_0x508ea8);const _0x19f1fb=_0x3875ec['result'];await _0x48b082[_0xd9bca6(0x1d9)](_0x3b2083[_0xd9bca6(0x1e3)],{'image':{'url':_0x19f1fb}});}catch(_0x2a0a2b){console[_0xd9bca6(0x1e5)](_0x2a0a2b),_0x4e71a9(_0xd9bca6(0x1e0)+_0x2a0a2b['message']);}});function _0x5798(){const _0x55932b=['error','22604510iyYLmn','34SSlRUM','main','fluxai','2980143gLHPys','https://api.giftedtech.web.id/api/ai/fluximg?apikey=gifted&prompt=','164361BWVkLz','>\x20*Subzero\x20Brewing\x20Your\x20Magical\x20image...πͺβ¨*','1032HGGrPq','668228cqMxlp','sendMessage','Generate\x20an\x20image\x20using\x20AI.','flux','../command','2265474WHqdaQ','27755dIYnOU','5MkefIL','An\x20error\x20occurred:\x20','../config','log','chat','452742WziasG'];_0x5798=function(){return _0x55932b;};return _0x5798();}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|