|
1 |
| -"""MIT License |
2 |
| -
|
3 |
| -Copyright (c) 2023-24 Erotixe |
4 |
| -
|
5 |
| - GITHUB: Erotixe |
6 |
| - TELEGRAM: @VeldXd |
7 |
| -
|
8 |
| -Permission is hereby granted, free of charge, to any person obtaining a copy |
9 |
| -of this software and associated documentation files (the "Software"), to deal |
10 |
| -in the Software without restriction, including without limitation the rights |
11 |
| -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
12 |
| -copies of the Software, and to permit persons to whom the Software is |
13 |
| -furnished to do so, subject to the following conditions: |
14 |
| -
|
15 |
| -The above copyright notice and this permission notice shall be included in all |
16 |
| -copies or substantial portions of the Software. |
17 |
| -
|
18 |
| -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
19 |
| -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
20 |
| -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
21 |
| -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
22 |
| -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
23 |
| -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
24 |
| -SOFTWARE.""" |
25 |
| -from pyrogram import filters |
| 1 | +from pyrogram import Client, filters |
26 | 2 | from pyrogram.types import Message
|
27 |
| -from pyrogram.enums import ChatAction |
28 | 3 | from pyrogram.types import InputMediaPhoto
|
29 |
| -from pyrogram import Client, filters, enums |
30 |
| -from info import BOT_USERNAME |
31 |
| -import requests |
| 4 | +from MukeshAPI import api |
| 5 | +from pyrogram.enums import ChatAction,ParseMode |
32 | 6 |
|
33 | 7 | @Client.on_message(filters.command("imagine"))
|
34 | 8 | async def imagine_(b, message: Message):
|
35 | 9 | if message.reply_to_message:
|
36 | 10 | text = message.reply_to_message.text
|
37 | 11 | else:
|
38 |
| - text =message.text.split(None, 1)[1] |
39 |
| - m =await message.reply_text( "Please wait...,\n\nGenerating prompt .. ...") |
40 |
| - results= requests.get(f"https://mukesh-api.vercel.app/imagine/{text}").json()["results"] |
41 | 12 |
|
42 |
| - caption = f""" |
43 |
| -sᴜᴄᴇssғᴜʟʟʏ Gᴇɴᴇʀᴀᴛᴇᴅ 💘 |
44 |
| -✨ Gᴇɴᴇʀᴀᴛᴇᴅ ʙʏ : @{BOT_USERNAME} |
45 |
| -🥀 ʀᴇǫᴜᴇsᴛᴇᴅ ʙʏ : {message.from_user.mention} |
46 |
| -""" |
47 |
| - await m.delete() |
48 |
| - photos=[] |
49 |
| - for i in range(5): |
50 |
| - photos.append(InputMediaPhoto(results[i])) |
51 |
| - photos.append(InputMediaPhoto(results[5], caption=caption)) |
52 |
| - await b.send_media_group(message.chat.id, media=photos) |
| 13 | + text =message.text.split(None, 1)[1] |
| 14 | + Lucy=await message.reply_text( "`ᴘʟᴇᴀsᴇ ᴡᴀɪᴛ ʙʀᴏ...\n\nɢᴇɴᴇʀᴀᴛɪɴɢ ɪᴍᴀɢe...`") |
| 15 | + try: |
| 16 | + await b.send_chat_action(message.chat.id, ChatAction.UPLOAD_PHOTO) |
| 17 | + x=api.ai_image(text) |
| 18 | + with open("lucy.jpg", 'wb') as f: |
| 19 | + f.write(x) |
| 20 | + caption = f""" |
| 21 | + ⌯ sᴜᴄᴇssғᴜʟʟʏ ɢᴇɴᴇʀᴀᴛᴇᴅ : {text} |
| 22 | + ⌯ ɢᴇɴᴇʀᴀᴛᴇᴅ ʙʏ : @lucy_filter_bot |
| 23 | + """ |
| 24 | + await Lucy.delete() |
| 25 | + await message.reply_photo("lucy.jpg",caption=caption,quote=True) |
| 26 | + except Exception as e: |
| 27 | + await Lucy.edit_text(f"error {e}") |
53 | 28 |
|
54 |
| -# -----------CREDITS ----------- |
55 |
| -# telegram : @VeldXd |
56 |
| -# github : Erotixe |
57 |
| -mod_name = "Aɪ ɪᴍᴀɢᴇ" |
58 |
| -help = """ |
| 29 | + |
| 30 | +__mod_name__ = "Aɪ ɪᴍᴀɢᴇ" |
| 31 | +__help__ = """ |
59 | 32 | ➻ /imagine : ɢᴇɴᴇʀᴀᴛᴇ Aɪ ɪᴍᴀɢᴇ ғʀᴏᴍ ᴛᴇxᴛ
|
60 |
| - ➻ /mahadev : ɢᴇɴᴇʀᴀᴛᴇ Mᴀʜᴀᴅᴇᴠ ɪᴍᴀɢᴇ |
61 | 33 | """
|
62 |
| - |
63 |
| -# ɪ ᴀᴍ ɴᴏᴛ ɪɴᴛᴇʀᴇsᴛᴇᴅ ɪɴ ʙᴇɪɴɢ ʏᴏᴜʀ sᴇᴄᴏɴᴅ ғᴀᴛʜᴇʀ ... sᴏ ᴅᴏɴ'ᴛ ʀᴇᴍᴏᴠᴇ ᴍʏ ᴄʀᴇᴅɪᴛ... |
64 |
| - |
65 |
| -#⋗ ᴛᴇʟᴇɢʀᴀᴍ - @Codeflix_bots |
66 |
| - |
67 |
| -#ᴛʜɪs ʟɪɴᴇ ɪs ғᴏʀ ᴄᴏᴘʏ-ᴘᴀsᴛᴇʀs... |
68 |
| -#...ᴡʜɪʟᴇ ʏᴏᴜ ᴀʀᴇ ʀᴇᴍᴏᴠɪɴɢ ᴍʏ ᴄʀᴇᴅɪᴛ ᴀɴᴅ ᴄᴀʟʟɪɴɢ ʏᴏᴜʀsᴇʟғ ᴀ ᴅᴇᴠᴇʟᴏᴘᴇʀʀ... |
69 |
| - # _____ ᴊᴜsᴛ ɪᴍᴀɢɪɴᴇ, Aᴛ ᴛʜᴀᴛ ᴛɪᴍᴇ ɪ ᴀᴍ ғᴜᴄᴋɪɴɢ ʏᴏᴜʀ ᴍᴏᴍ ᴀɴᴅ sɪs ᴀᴛ sᴀᴍᴇ ᴛɪᴍᴇ, ʜᴀʀᴅᴇʀ & ᴛᴏᴏ ʜᴀʀᴅᴇʀ... |
70 |
| - |
71 |
| -#- ᴄʀᴇᴅɪᴛ - Github - @Codeflix-bots , @erotixe |
72 |
| -#- ᴘʟᴇᴀsᴇ ᴅᴏɴ'ᴛ ʀᴇᴍᴏᴠᴇ ᴄʀᴇᴅɪᴛ.. |
73 |
| -#- ᴛʜᴀɴᴋ ʏᴏᴜ ᴄᴏᴅᴇғʟɪx ʙᴏᴛs ғᴏʀ ʜᴇʟᴘɪɴɢ ᴜs ɪɴ ᴛʜɪs ᴊᴏᴜʀɴᴇʏ |
74 |
| -#- ᴛʜᴀɴᴋ ʏᴏᴜ ғᴏʀ ɢɪᴠɪɴɢ ᴍᴇ ᴄʀᴇᴅɪᴛ @Codeflix-bots |
75 |
| -#- ғᴏʀ ᴀɴʏ ᴇʀʀᴏʀ ᴘʟᴇᴀsᴇ ᴄᴏɴᴛᴀᴄᴛ ᴍᴇ -> ᴛᴇʟᴇɢʀᴀᴍ @codeflix_bots Community @Otakflix_Network </b> |
0 commit comments