-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
802da04
commit 40687b5
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from pyrogram import filters | ||
from pyrogram.types import Message | ||
from pyrogram.types import InputMediaPhoto | ||
from MukeshAPI import api | ||
from pyrogram.enums import ChatAction,ParseMode | ||
from ANNIEMUSIC import app | ||
|
||
@app.on_message(filters.command("imagine")) | ||
async def imagine_(b, message: Message): | ||
if message.reply_to_message: | ||
text = message.reply_to_message.text | ||
else: | ||
|
||
text =message.text.split(None, 1)[1] | ||
Jarvis=await message.reply_text( "`Please wait...\n\nGenerating image .....`") | ||
try: | ||
await b.send_chat_action(message.chat.id, ChatAction.UPLOAD_PHOTO) | ||
x=api.ai_image(text) | ||
with open("mukesh.jpg", 'wb') as f: | ||
f.write(x) | ||
caption = f""" | ||
💘sᴜᴄᴇssғᴜʟʟʏ ɢᴇɴᴇʀᴀᴛᴇᴅ : {text} | ||
✨ɢᴇɴᴇʀᴀᴛᴇᴅ ʙʏ : @Annie_Music_Robot | ||
🥀ʀᴇǫᴜᴇsᴛᴇᴅ ʙʏ : {message.from_user.mention} | ||
""" | ||
await Jarvis.delete() | ||
await message.reply_photo("mukesh.jpg",caption=caption,quote=True) | ||
except Exception as e: | ||
await Jarvis.edit_text(f"error {e}") | ||
|
||
|
||
__mod_name__ = "Aɪ ɪᴍᴀɢᴇ" | ||
__help__ = """ | ||
➻ /imagine : ɢᴇɴᴇʀᴀᴛᴇ Aɪ ɪᴍᴀɢᴇ ғʀᴏᴍ ᴛᴇxᴛ | ||
""" |