Advertisement
samiroexpikachu

Flux.1 pro

Sep 6th, 2024 (edited)
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module.exports = {
  2. config: {
  3. name: "flux",
  4. author: "jun jaam",
  5. category: "ai-generated"
  6. },
  7. onStart: async ({ message: { reply: r }, args: a }) => {
  8. let pr = a.join(" ");
  9. if(!pr) return r("add query");
  10. ratio = "1:1", m = pr.match(/--(\d)$/);
  11.  if (m) {
  12.  ratio = { "1": "1:1", "2": "9:16", "3": "3:2", "4": "16:9" }[m[1]] || "1:1";
  13. pr = pr.replace(/--\d$/, "").trim();
  14. }
  15. try {
  16. r({
  17. body: pr,
  18. attachment: await global.utils.getStreamFromURL(`https://samirxpikachuio.onrender.com/fluxpro?prompt=${encodeURIComponent(pr)}&ratio=${ratio}`),
  19. });
  20. } catch (err) {
  21.  r(err.message);
  22.   }
  23.  },
  24. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement