Advertisement
samiroexpikachu

ArcticFL

Oct 5th, 2024 (edited)
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const axios = require('axios');
  2.  
  3. module.exports = {
  4.   config: {
  5.     name: "fl",
  6.     aliases: ["arctic"],
  7.     version: "1.0",
  8.     author: "ArchitectDevs",
  9.     contributor: "Faith XE | Samir Œ |NS Sakib",
  10.     countDown: 5,
  11.     role: 0,
  12.     shortDescription: "image generator",
  13.     longDescription: "",
  14.     category: "ai-generated",
  15.     guide: {
  16.       en: "{pn} <prompt>  "
  17.     }
  18.   },
  19.  
  20.   onStart: async function ({ message, args }) {
  21.     let prompt = args.join(" ");
  22.    
  23.     try {
  24. let a = '.run'
  25.       const apiUrl = `https://www.samirxpikachu${a}.place/arcticfl?prompt=${encodeURIComponent(prompt)}`;
  26.      
  27.       const imageStream = await global.utils.getStreamFromURL(apiUrl);
  28.  
  29.       if (!imageStream) {
  30.         return message.reply("Failed to retrieve image.");
  31.       }
  32.      
  33.       return message.reply({
  34.         body: '',
  35.         attachment: imageStream
  36.       });
  37.     } catch (error) {
  38.       console.error(error);
  39.       return message.reply("Failed to retrieve image.");
  40.     }
  41.   }
  42. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement